1

Hi I've just downloaded the 64 bit version of the node.js on windows and I want to use npm to install a package for me, but when i open the node.exe terminal and write : npm install sth it gives me this error: npm should be run outside of the node repl, in your normal shell. what should I do? how should I use npm with .exe version of the node.js?

1
  • The docs are misleading: npmjs.org says that npm is bundled with node, but when you download just the Windows .exe file, you're downloading a non-bundled version of NodeJS. I tried the .msi and it failed for me. This SO answer was helpful: stackoverflow.com/questions/7300132/… Commented Aug 6, 2015 at 13:05

2 Answers 2

1

The npm is an external command that should be used in the terminal, not node.exe repl. You should only use node.exe as repl - Read Print Eval Loop, or a tool where you input some javascript code and immediately see interpreted result, same as browser console (if you've ever used those to try out a javascript code snippet).

On windows, open cmd (Win + R and type cmd), then run the command you were trying to run within node.exe, for example npm update npm -g.

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

Comments

0

Run it from windows command shell cmd.exe

If it doesn't work from there, you might want to look at the answers at:

How to resolve 'npm should be run outside of the node repl, in your normal shell'

Comments

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.