npm ERR! registry error parsing json - While trying to install Cordova for Ionic Framework in Windows 8

后端 未结 12 1234
感情败类
感情败类 2020-12-13 08:31

I was trying to instal Ionic framework in my Windows 8 system and was trying to install Cordova first.

I\'m getting this error while trying to install Cordova, that

12条回答
  •  南笙
    南笙 (楼主)
    2020-12-13 09:15

    In my case all Internet access must run through a proxy and npm was not configured with the proxy to reach http://registry.npmjs.org.

    I ran npm install --log-level verbose to get more information and saw that the response had HTML stating I was not authenticated with the proxy.

    Running the following fixed it (replacing below with your username/password/proxy address:

    npm config set proxy 'username:password@your.proxy.com'
    npm config set https-proxy 'username:password@your.proxy.com'
    

    I do not advise putting the password in raw text instead using something like cntlm to set up a local proxy that delegates to the real proxy.

提交回复
热议问题