npm will not install express?

后端 未结 8 1023
臣服心动
臣服心动 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 11:52

    The solution is:

    1 - chown to your user the .npm folder :

    sudo chown -R Webmaste /Users/webmaste/.npm/
    

    2 - At your test folder or your folder:

    sudo npm install -g express@2.5.8
    

    3 - Invoke express from your actual location:

    /usr/local/share/npm/bin/express
    

    4 -

    sudo cd . && npm install
    

    5 - finally:

    node app
    

    the final message in the console should look like this:

    Express server listening on port 3000 in development mode
    

提交回复
热议问题