Node.js and NPM Packages Not Installing

Hello,

I'm attempting to install NPM packages but when I search for my package and click 'Install Package', nothing happens. If I click off the package, the 'Install Package' button becomes clickable again. If I close the 'Available Packages' dialog box, I don't see the package I attempted to install. I sometimes get an 'Out of Memory' error, but this is a random occurrence.

I have WebStorm installed on Mac OS Mavericks 10.9.4 and am currently using Node.js v0.10.29 (NPM package 1.4.21).

Anyone with ideas on how to get past this? Thanks.

Jodie.

9 comments

I realized my error. I had to give permissions to write to the usr/local/lib folder. Once I installed the packages globally from Terminal, and elevated the permissions, I was able to see the installed packages in WebStorm.

0

Hi Jodie,

I have the same problem but on a pc  running Window 8 x64, I tried to run as PhpStorm administrator and to  grant write access to the whole npm library directory, but no luck.
Do you have any advise that could be helpful for me?

Thank you in advance.

0

Try executing 'npm install' in the command line - what is the output?

0

Thanks Elena!

This is the output I get:

Microsoft Windows [Versione 6.3.9600]
(c) 2013 Microsoft Corporation. Tutti i diritti riservati.
Microsoft Windows [Versione 6.3.9600]

(c) 2013 Microsoft Corporation. Tutti i diritti riservati.

C:\Windows\system32>npm install
npm ERR! install Couldn't read dependencies
npm ERR! package.json ENOENT, open 'C:\Windows\system32\package.json'
npm ERR! package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm can't find a package.json file in your current directory.

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Windows\system32
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! path C:\Windows\system32\package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Windows\system32\npm-debug.log
npm ERR! not ok code 0

C:\Windows\system32>



Attachment(s):
npm-debug.log.zip
0

Expected output - as you don't have a valid package.json in C:\Windows\system32. But at least npm is installed and works:)
What exactly did you try to do in WebStorm? Install a package by clicking 'Install (Alt+Insert)' in Settings/Node.sj and NPM?

0

Yes! That's exactly what I'm trying do! But in PhpStorm instead of Webstorm.

0

Ok Elena, thank you for the answer. Any idea about how to solve that?

Thank you again.

0

I don't think that anything can be done on your side. Use 'npm install <package name>' in terminal to install packages

0

Please sign in to leave a comment.