Reputation: 83537
I am creating my first React app in IntelliJ IDEA by following these instructions. After following the New Project Wizard, I get the following error:
/usr/bin/node /usr/local/bin/index.js untitled
module.js:472
throw err;
^
Error: Cannot find module '/usr/local/bin/index.js'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:427:7)
at startup (bootstrap_node.js:151:9)
at bootstrap_node.js:542:3
Done
Why is it looking in /usr/local/bin/
? And where should it be looking instead? How do I configure IntelliJ to do this correctly?
P.S. I have an IntelliJ IDEA Ultimate license and installed the NodeJS plugin. I have NodeJS 7.10.1 and npm 5.4.2 installed. I also installed create-react-app
with npm.
Note: I can run create-react-app
(version 1.4.0) from the command line without any error.
Upvotes: 2
Views: 11952
Reputation: 83537
In the New Project wizard, IntelliJ is asking for the folder where the create-react-app package is installed. I originally gave the location of the create-react-app binary executable. I solved this problem by pointing IntelliJ to /usr/lib/node_modules/create-react-app
.
Upvotes: 3