"--watch is not supported without git/hg" with cygwin jest and git - testing

I would really appreciate help with this.
I have cygwin installed and set up to use the PATH from windows. This has been working great for a ton of node development, but I've recently run into an issue where when I run
yarn jest --watch
I get the following error:
--watch is not supported without git/hg, please use --watchAll
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I have installed git and node in windows.
I have found a workaround of using the Command Prompt for running the tests, but would really like to be in one environment.

--watch works only for git repositories.
if you still have issue it is yarn issue npm gives the same error too. delete your node_modules folder, update yarn or npm to the latest version, then reinstall all the packages again.

After some consideration, I thought my workaround could be a valid answer to this question. Although, I would still like to get this working properly in Cygwin.
If you have node and git installed in windows then you can go into the Command Prompt and run yarn test --watch or npm run test -- --watch to accomplish the same thing.

I know it's been a long time. But i was facing the same issue and what resolved it for me was, to change the default terminal of whatever editor you're using to GIT command line. I was using VS Code and changing the terminal to GIT worked like a charm.

Make sure you're running it in a Git repo (initialised with git init). Otherwise it doesn't know how to get only the changed files.
If you don't want to run tests only on changed files, you can use --watchAll, which runs all the tests.

I also encountered this problem, the reason is that I use the mv command to move the project folder, however the command was not removed .git has points such as the beginning of the file

npm run test -- watchAll
Please use watchAll to serve it in a continue way. It will track your changes and re-run the test automatically.

git init
solves the problem, that way it knows the changed files

Related

Building ngx-bootstrap locally

Simple, I cloned the repository of ngx-bootstrap and tried to build it locally.
To execute npm install to took me about 4 hours (because of the infinite problems which I get)
after a huge effort, I managed to install the packages.
then comes the next step npm run build here I faced with the following problem
Building collapse module
Error: Command failed: C:\WINDOWS\system32\cmd.exe /q /s /c "npm run dist-to-modules"
'cp' is not recognized as an internal or external command,
operable program or batch file.
I understand that the cp is Linux based command and it will not work in windows, I tried to change to play with the command in the script section in the package.json but without luck, it did not work.
my question is, if somebody wants to build ngx-bootstrap on Windows, why there is no guide for them to do that, why it is only for Linux?
how should I change the following command
"dist-to-modules": "cp -R ./dist/. ./node_modules/ngx-bootstrap"
to make it work on windows?
I am really frustrated, building a library should not be such a hard task
You have to use copy instead of cp. Just update the script.
Oh yes, we had an issue with the Windows build, and, Barry helped with that :)
Gonna be fixed in 6.1.0 version, which will be released in a few weeks, I think, or, earlier

'EPERM: operation not permitted' error when building Nuxt app

Getting one of the following intermittant errors when running npm run dev:
EPERM: operation not permitted, mkdir 'D:\projects\my_project\.nuxt\components'
EPERM: operation not permitted, lstat 'D:\projects\my_project\.nuxt
I tried npm cache clear to no avail. Some people attribute this issue to npm install folders shared on some network, not my case.
Note: this is a random issue. I just tried again after a couple hours and now it works. But when creating this question, it never worked no matter how many times I tried.
Any idea?
I had the same issue. I believe is related on VS Code.
I closed VS Code and stopped my console.
I rebuild Nuxt with 'npm run dev' and reopen VS Code.
Now is working.
To solve this issue is only
Stop dev, Close your CMD and Open CMD again and last you can npm run dev again
Hope this will help you :)
Same issue. I'm on windows with VS code. Closed terminal and run again with administrator, then it worked. Permission issue.
first close the vscode and the bash or cmd runner the project
then
just remove the ".nuxt" directory form root your project
I am using webstorm, and this problem also happened to me. I closed my terminal, then I closed webstrom and opened my IDE again and npm run dev. It solved my problem and maybe it can solves yours.
I was running Nuxt inside Docker, and it seemed that this issue was caused by my Docker images using up all the allotted space.
After cleaning up Docker images and containers, things started working again when I reinstalled.
Edit:
Never mind, this issue happens when I change branches with git. Fixing it is simply about restarting Docker.
For me the issue was that the file rights were given to root rather than to my user.
I fixed it using the command:
chown -R <user>:<group> .nuxt
Make sure to replace the <user> and <group>.
In my situation, dev script was already running so it prevented build script to access that directory.

How To Get Started With React Admin On Windows

It is difficult to get started or setup this entire repo in Windows?
Can you please give step by step approach to set this up in Windows or a short video tutorial?
I just ran into this issue. My fix was to:
Delete the react-admin directory if you already have a clone from the repo
Update Node and Yarn
-- After update I am currently running Node v10.13.0 && Yarn v1.12.3
Grab a fresh clone of the repo
Then from the react-admin directory run:
yarn
Once that completes:
yarn build
And finally once that completes:
yarn run-demo
lmk if this works for you :-)
There isn't much. Until we add a Windows section in the README, here's how you can get started:
run yarn to install all dependencies
run yarn run-simple to start the playground app and test your changes
There are more scripts in the root package.json file to run tests, demos, etc.
If you need help with something more specific, please precise it in your question

Can't install Semantic-UI via NPM

I've been trying to install Semantic via NPM for a while now and am having problems. I run npm install semantic-ui and it goes through the setup process. However, it stops at Finished 'install' after 3.61 s and never exits the process. If I manually cancel the process and navigate to the semantic folder and run gulp build I'm told there's no local gulp found. So I run npm install gulp just for fun. It installs and I run gulp build again but all of the gulp dependencies are missing.
Any ideas? It's getting frustrating because I've been tinkering with it for a few hours instead of getting to work on the actual project. Running npm install in the semantic directory or my project directory doesn't work either. Thanks for the help!
EDIT: I tried creating a new Ubuntu VM and installing Semantic the same way I was on my Mac. It worked with no problems leading me to believe it's something to do with my configuration on my Mac.
This is really odd, but after I got to the Finished 'install' step, nothing was happening. Just a solid cursor when the node deps should've been installing. I decided to hit return just to see if anything would happen and that seems to have done it. Hitting return gives me the spinning cursor and the deps install. I can successfully run gulp build after that. Weird.

How to include executables in the IntelliJ IDEA path for successful pre-committing?

I have a Git pre-commit hook that runs a Grunt command. However, Grunt is not on the path that IDEA runs under, so when I try to commit through the IDE I get a grunt: command not found error.
How can I ensure that Grunt is available to IDEA?
Turns out that this is because /usr/local/bin wasn't on the PATH (in OSX). See https://stackoverflow.com/a/17557522/555642.
I also had the same issue and then I executed the npm install. Thereafter I was able to run the grunt commands. Tryout and see this might fix the issue.