Typescript-react-starter: npm run gives error "--watch is not supported without git/hg...ERR! code ELIFECYCLE"

Created on 26 Mar 2018  路  6Comments  路  Source: microsoft/TypeScript-React-Starter

npm run test gives me the error:

Determining test suites to run...
--watch is not supported without git/hg, please use --watchAll
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test: react-scripts-ts test --env=jsdom
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\\AppData\Roamingnpm-cache_logs\2018-03-26T05_52_03_465Z-debug.log

Versions: node v9.9.0, npm v5.6.0

Most helpful comment

Running "git init", it should work. No need to change any line of code

All 6 comments

change line 31 in /node_modules/react-scripts-ts/scripts/test.js

from

argv.push('--watch');

to

argv.push('--watchAll');

this should solve the problem.

@nineonine That worked. Should I close this as a problem particular to my set up or should someone submit a pull request? So I can debug myself in the future, how did you know the error was that file, and that line?

@user135711 the first line of error output indicates that there is something wrong with watch/watchAll . It also mentions react-scripts-ts so I experimented and that paid off.

Running "git init", it should work. No need to change any line of code

why tho @porkopek ?

Instructions should now make this explicit.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

corydeppen picture corydeppen  路  6Comments

wongjiahau picture wongjiahau  路  9Comments

JukoPowel picture JukoPowel  路  3Comments

simonccarter picture simonccarter  路  3Comments

a455047 picture a455047  路  8Comments