Manually installing NPM packages

后端 未结 5 491
一个人的身影
一个人的身影 2021-01-02 02:47

I used the node windows installer v0.8.3 to install nodejs. When I try to install express like this:

npm install express

It\'s not working

相关标签:
5条回答
  • 2021-01-02 03:23

    It would probably be most convenient long-term to configure NPM to use the aforementioned proxy through one of the following methods (In the following, replace $PROXY with your proxy in the form $PROTOCOL://$DOMAIN:$PORT (e.g. http://proxy.server:80))

    A. Set the environment variables http_proxy and https_proxy to $PROXY

    B.

    npm set proxy $PROXY
    npm set https-proxy $PROXY
    
    0 讨论(0)
  • 2021-01-02 03:27

    Try npm install .\express (assuming the express folder is in the current folder).

    The problem is that express in npm install express is parsed as a package name, while .\express in npm install .\express is parsed as a folder name.

    0 讨论(0)
  • 2021-01-02 03:32

    You will want to run npm install . from within your F:/express/ folder (or npm install -g . for a global install).

    It looks like you downloaded beta version (3.0.0beta7). Try installing the latest stable version (2.5.11):

    npm install https://github.com/visionmedia/express/tarball/2.5.11
    
    0 讨论(0)
  • 2021-01-02 03:36

    If you have trouble getting packages because of a proxy or other internet connection problem then set up the project on another machine. Then copy the project over to your target. It will have all the files that you need.

    0 讨论(0)
  • 2021-01-02 03:41

    express itself has a lot of dependencies which I believe npm also tries to retrieve if you issue npm install. I think you should just configure proxy properly => http://jjasonclark.com/how-to-setup-node-behind-web-proxy?

    0 讨论(0)
提交回复
热议问题