Unable to load Node packages using npm and shell

I installed Node 0.10.12 on Windows 7 using the MSI installer

Before that, I installed python 2.7 and gmake - all of which were successfully installed.

Now i type

"$ sudo npm install -g sax" to download the sax package and nothing is happening. All I get is "...". Just 3 dots. 

Does this mean that the download is in progress or something is wrong? I think something is wrong, as I see these points for 30 minutes and still nothing. I just do not understand.

In addition, the book I read about node says "/ usr / local / lib / node_modules" for module folders, but I found the default modules here "C: \ Program Files (x86) \ nodejs \ node_modules \ NPM \ node_modules ". It is not right? Does this mean that something went wrong?

+4
source share
2 answers

Three dots mean that you are executing a command inside the node interpreter (Node.js).

Run npm install -g sax from the windows command line terminal, not node.js. Enter cmd after opening the Windows menu and open the program, then enter this command.

+16
source

"/ usr / local / lib / node_modules" will be UNIX (linux). I have not tried running nodejs on windows, but this way should be fine.

sudo will make your command run as an administrator on Linux, on Windows you can try just "npm install -g sax".

-1
source

Source: https://habr.com/ru/post/1488913/


All Articles