If you're trying to install the dependencies of an existing project (which the context implies), you need to run the command npm install
in the directory where the package.json
file of the project is.
If you've created a new and empty project folder, you need to first run npm init
to create a package.json
file which is used to manage the dependencies of your project.
Are you sure you're in the head directory? For example, if your project is in: $ Documents/Projects/JS-Projects/Work/Client-Management-App/
Then that's the folder you need to be in: the Client-Management-App/
directory, because that's where the package.json
file and the /node_modules/
folder will be created.
Also, have you run npm init
? That might be another reason why.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.