Error: Cannot find module 'react-dev-utils/clearConsole'
Everything is fine after I run 'npm install --save react-barcode' except a react peer dependencies error.
npm WARN [email protected] requires a peer of react@^16.0.0 but none is installed. You must install peer dependencies yourself.
But I got this error (below) when I run 'npm start' as usual. (It happens only when I have react-barcode installed in my project.)
module.js:538 throw err; ^
Error: Cannot find module 'react-dev-utils/clearConsole' at Function.Module._resolveFilename (module.js:536:15) at Function.Module._load (module.js:466:25) at Module.require (module.js:579:17) at require (internal/module.js:11:18) at Object.
(/Users/penpitchan/Developer/project-name/scripts/start.js:22:22) at Module._compile (module.js:635:30) at Object.Module._extensions..js (module.js:646:10) at Module.load (module.js:554:32) at tryModuleLoad (module.js:497:12) at Function.Module._load (module.js:489:3) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] start:
node scripts/start.jsnpm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start 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/penpitchan/.npm/_logs/2018-01-20T14_18_23_078Z-debug.log
I want to know how to solve his problem. Thank you in advance.
remove node modules folder and do a simple npm install command