0

I installed node js v13.14.0 on my machine but when I am trying to hit node -version it gives me an error saying node: bad option: -version whereas it works for npm -v and node -v. Also, complete command npm -version works.

And I am not able to start npm with npm start command. Can somebody plz help?

1 Answer 1

1

Use node --version.

npm start is actually performing task(s) defined in a package.json within your project. Usually you will get an error if you run npm start in a directory without a package.json. In case other errors occur, npm usually gives a detailed output of what went wrong.

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

3 Comments

Now I am getting something like this on starting npm @chilyiskult . node --version is working perfectly.
D:\React>npm start npm ERR! code ENOENT npm ERR! syscall open npm ERR! path D:\React\package.json npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file or directory, open 'D:\React\package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\pg5050107\AppData\Roaming\npm-cache_logs\2021-01-08T14_16_01_974Z-debug.log
This is exactly what I referred to in my answer. There is no package.json in your D:\React folder.

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.