xoux
xoux

Reputation: 3494

Where is the node_modules directory located in a React Native project?

In a simple JavaScript application that utilizes npm modules, I have a package.json, and after running npm install I get a node_modules folder.

How does this work in React Native, where is the node_modules directory in a React Native project?

Upvotes: 2

Views: 6146

Answers (3)

Ankit Aggarwal
Ankit Aggarwal

Reputation: 3131

As you said you can see the module in when you do ls in terminal. That means that "node_module" is in .gitignore. Atom excludes files which are gitignored. You can disable that settings. Following are the steps for mac. Go to atom preferences > Core > and untick "Exclude VCS Ignored Path" option.

There will be similar settings in windows also if you are developing in windows

Upvotes: 2

I Putu Yoga Permana
I Putu Yoga Permana

Reputation: 4220

The location should be in the root of your project. Assume your root project directory on AwesomeProject it should be on AwesomeProject/node_modules.

How do you create your react native app ? If you using create-react-native-app it will automatically install the npm packages.

create-react-native-app AwesomeProject
cd AwesomeProject
npm start

If not, try run npm install on your root project (contain package.json).

Upvotes: 5

李振纲
李振纲

Reputation: 382

npm install

you will see node_modules in the root of your project;

Upvotes: 2

Related Questions