-
Notifications
You must be signed in to change notification settings - Fork 489
npm error: --watch is not supported without git/hg, please use --watchAll #282
Comments
I am experiencing the same issue. However, I just used changing line 31 in
to
solves the problem. |
What @nineonine suggested does work. I will be waiting for a perm solution |
Hm - the CRA solution seems to be to pick up
with
in the generated project's |
Until the fix lands in stable, it appears you can also do a quick |
The change mentioned above was pre-picked and released in 2.15.1 of |
go to /node_modules/react-scripts-ts/scripts/test.js and |
Is this a bug report?
Yes
Can you also reproduce the problem with npm 4.x?
Yes.
Environment
npm ls react-scripts-ts
: [email protected]node -v
: v9.7.0npm -v
: 5.7.1os
: macOS 10.13.1Steps to Reproduce
create-react-app my-app --scripts-version=react-scripts-ts
.npm run test
Expected Behavior
No error happen and tests are executed.
Actual Behavior
When running the command described above, the test script is having the mentioned error. This error happens only under a npm context. When running the script directly on terminal only the warning message is shown but still no test is executed.
This same issue is not happening in base project react-scripts.
After struggling a bit why it is happening I've come across
test.js
file where is being carried the testing operation. I've just replaced--watch
by--watchAll
as indicated in the message returned. The next execution was successful.Intrigued if this change has being done in react-scripts project, I've found the
test.js
file differs from the current project from line 24. The interesting part is where this option is attached. It is still passing the same--watch
and not the--watchAll
as the message warns.So, I don't know if this change I'm pointing out must be the proper fix.
Please have a look when you have time. Thanks.
The text was updated successfully, but these errors were encountered: