0

I have NodeJS installed and am trying to do this tutorial for making a NodeJS chat app: http://socket.io/get-started/chat/

I created the package.json file in it's own dedicated folder, and executed in the windows command prompt this npm command from the tutorial I linked.

npm install --save express@4.10.2

The error I receive is as follows:

Error: ENOENT, stat 'C:\Users\david\AppData\Roaming\npm'

So I wemt to the ExpressJS page, tried the command they list on their site, which is.

npm install express --save

And I receive the same error. Anyone know how to fix this, please?

JohnWick
  • 4,929
  • 9
  • 37
  • 74
  • 1
    Looks like npm doesn't have permission to that folder for some reason. I'm not on Windows so I'm afraid I can't give you much more advice than that. – Alexis King Jan 27 '15 at 01:31
  • 2
    possible duplicate of [Node.js/Windows error: ENOENT, stat 'C:\Users\RT\AppData\Roaming\npm'](http://stackoverflow.com/questions/25093276/node-js-windows-error-enoent-stat-c-users-rt-appdata-roaming-npm) – mido Jan 27 '15 at 01:31
  • 1
    Thanks both of you, especially you mido. This is indeed a bug, the folder in the error message needs to be manually created, the installer isn't able to I guess (although I received no error messages during installation...), because of permission issues with creating that folder as Alexis suggested. The link you posted solved my problem. I appreciate it. – JohnWick Jan 27 '15 at 01:34
  • 1
    I work in Mac OSx encountered similar problem, run command as root user, should fix your problem. – NarendraSoni Jan 27 '15 at 02:26
  • sudoers do not get along well with windows. – myusuf Jan 27 '15 at 06:08
  • Run command prompt as administrator on Windows. – Richard Denton Jan 27 '15 at 13:16

0 Answers0