npm will not install express?

后端 未结 8 1058
臣服心动
臣服心动 2020-12-23 11:39

I currently have node.js version 0.8.8, and npm 1.1.59 installed.

Whenever I run:

$ npm install -g express

I get this in return:<

8条回答
  •  [愿得一人]
    2020-12-23 12:09

    If you can't see nothing wrong with using sudo npm install -g package_name. And have the problem with typing a password you can always add yourself to sudoers files or to the same group that npm executable belongs to.

    And so to add yourself to sudoers for npm edit /etc/sudoers adding something like this to the bottom of the file:

    your_username  localhost=/usr/local/bin/npm
    

    Here is step by step guide on how to achieve that if you need more details.

提交回复
热议问题