Reputation: 1654
When I run npm install create-react-app
in any folder, it creates a node_modules
folder. What is the node_modules
folder for? How is it related to create-react-app
?
Upvotes: 2
Views: 2012
Reputation: 96
You can install globally by npm install -g create-react-app
if you want to avoid creating node_modules directory.
Upvotes: 1
Reputation: 1
Basically is the folder that contains all the node packages that your app requires, nmp install create-react-app depends on other node packages that will be installed in the node_modules folder.
Upvotes: 0
Reputation: 48402
create-react-app
should be installed using npm install -g create-react-app
that will make the create-react-app
command available in any directory.
See the npm documentation for a complete description of the various folders that npm
creates or writes to.
Whe you run npm install create-react-app
(without the global (-g
) modifier) npm executes a local dependency install and puts the results in ./node_modules
of the current directory.
Upvotes: 3
Reputation: 20885
Short answer: yes.
Long answer: create-react-app
should be installed globally, then run inside the folder in which you wish to put your app.
Upvotes: 0