Skip to content
Advertisement

NPM Run Watch is Not Working For React Project

Hello Im trying to use NPM Run Watch so I can see localhost:3000 for my React Project but I’m getting a weird error so I don’t even know where to begin.

   Rubens-iMac:react-redux rubenesquivel$ npm run watch

> CodingPhase-StarterKit@1.0.0 watch /Users/rubenesquivel/Dropbox/Web Development/Web Development Courses/Coding Phase/react-redux
> gulp

fs.js:45
} = primordials;
    ^

ReferenceError: primordials is not defined
    at fs.js:45:5
    at req_ (/Users/rubenesquivel/Dropbox/Web Development/Web Development Courses/Coding Phase/react-redux/node_modules/natives/index.js:143:24)
    at Object.req [as require] (/Users/rubenesquivel/Dropbox/Web Development/Web Development Courses/Coding Phase/react-redux/node_modules/natives/index.js:55:10)
    at Object.<anonymous> (/Users/rubenesquivel/Dropbox/Web Development/Web Development Courses/Coding Phase/react-redux/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js:1:37)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! CodingPhase-StarterKit@1.0.0 watch: `gulp`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the CodingPhase-StarterKit@1.0.0 watch 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!     /Users/rubenesquivel/.npm/_logs/2021-02-20T22_29_40_150Z-debug.log
Rubens-iMac:react-redux rubenesquivel$ 

enter image description here

Not sure if anyone is familiar with this guy but I’m using codingphase starter package and before I did npm run watch I installed gulp I had some errors but I fixed using commands from stack over flow so Im worried maybe I did something to cause this on accident. I hope this makes sense.

Advertisement

Answer

Ok I figured out what was causing the issue. The main folder I put the react project in had spaces in it. For Example I had it called Calendar web app and should have called it calendar-web-app. Yeah i know this was a rookie mistake but figure ill let everyone know in case it happens to anyone else. Thanks to everyone who took the time to help out.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement