React Scripts fails to compile
15:03 14 Jun 2017

I've found a bunch of somewhat related answers but can't seem to fix so far...

Bit new to React (and I'm tirrred) so have no clue - I've created a new React app with create-react-app, then added the Github Pages bits in package.json per here.

On npm run build it's failing to compile. Error below. things I've tried:

  • Removing and reinstalling node_modules
  • clearing npm cache
  • destroying and rebuilding proj from scratch

> react-scripts build

Creating an optimized production build...
Failed to compile.

Module not found: Error: Can't resolve 'react' in '/Users/Mac/Sites/cintacks/src'

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cintacks@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cintacks@0.1.0 build 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/Mac/.npm/_logs/2017-06-14T19_52_07_541Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! cintacks@0.1.0 predeploy: `npm run build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the cintacks@0.1.0 predeploy script
node.js reactjs npm github-pages