0

I am trying to install and run npm in a linux environment. I have executed the below code to try and achieve this

nvm install v11.0.0
nvm use v11.0.0
npm install
npm start

When I execute npm install in the command line I keep getting the following error message. Any advice to help this run is much appreciated.

npm WARN saveError ENOENT: no such file or directory, open '/home/andrewoca/PycharmProjects/pythonProject/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/home/andrewoca/PycharmProjects/pythonProject/package.json'
npm WARN pythonProject No description
npm WARN pythonProject No repository field.
npm WARN pythonProject No README data
npm WARN pythonProject No license field.

1
  • npm install is looking for package.json in order to see what it needs to do. Since you dont have it - you get the errors. Commented Sep 26, 2021 at 14:01

2 Answers 2

1

npm install is looking for package.json in order to see what it needs to do. Since you dont have it - you get the errors.

See https://docs.npmjs.com/cli/v7/commands/npm-install

Sign up to request clarification or add additional context in comments.

Comments

0

Before running npm install, create an npm project.

This can be done with npm init -y

Now you can use npm install <package name>

2 Comments

I saw the comment you tried to add @Andrewoca now you would do npm install react-scripts or any other packages you need
I did try the above however I now have gotten a rake of errors. I guess I will have to do some further research into it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.