在nodejs中安装mysql模块时出错(Error in installing mysql module in nodejs)
我是nodejs.的新手。我试图使用下面的命令安装mysql模块
npm install mysql它显示以下错误。
C:\Program Files\nodejs>npm install mysql npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files \\node_modules\\npm\\bin\\npm-cli.js" "install" "mysql" npm ERR! node v0.12.4 npm ERR! npm v2.10.1 npm ERR! code ETIMEDOUT npm ERR! errno ETIMEDOUT npm ERR! syscall connect npm ERR! network connect ETIMEDOUT npm ERR! network This is most likely not a problem with npm itself npm ERR! network and is related to network connectivity. npm ERR! network In most cases you are behind a proxy or have bad networ gs. npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly. See: 'npm help config' npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files \\node_modules\\npm\\bin\\npm-cli.js" "install" "mysql" npm ERR! node v0.12.4 npm ERR! npm v2.10.1 npm ERR! Uncaught, unspecified "error" event. npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! <https://github.com/npm/npm/issues> npm ERR! Please include the following file with any support request: npm ERR! C:\Program Files\nodejs\npm-debug.log C:\Program Files\nodejs>如何解决上述错误? 任何帮助将不胜感激!!!
i am newbie to nodejs.I was trying to install the mysql module using the below command
npm install mysqlIt display the below error.
C:\Program Files\nodejs>npm install mysql npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files \\node_modules\\npm\\bin\\npm-cli.js" "install" "mysql" npm ERR! node v0.12.4 npm ERR! npm v2.10.1 npm ERR! code ETIMEDOUT npm ERR! errno ETIMEDOUT npm ERR! syscall connect npm ERR! network connect ETIMEDOUT npm ERR! network This is most likely not a problem with npm itself npm ERR! network and is related to network connectivity. npm ERR! network In most cases you are behind a proxy or have bad networ gs. npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly. See: 'npm help config' npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files \\node_modules\\npm\\bin\\npm-cli.js" "install" "mysql" npm ERR! node v0.12.4 npm ERR! npm v2.10.1 npm ERR! Uncaught, unspecified "error" event. npm ERR! npm ERR! If you need help, you may report this error at: npm ERR! <https://github.com/npm/npm/issues> npm ERR! Please include the following file with any support request: npm ERR! C:\Program Files\nodejs\npm-debug.log C:\Program Files\nodejs>How to resolve the above error? Any help will be greatly appreciated!!!
最满意答案
如果您已检查网络设置,并且您确定不使用任何代理,则可以尝试以下操作:
npm config delete proxyNPM似乎有时会设置错误的代理配置,尽管实际上并不需要。 此命令将删除已配置的代理。
如果您这样做,请评论您的结果。
If you have checked your Network settings and you are sure that you do not use any proxy you can try this:
npm config delete proxyNPM seems to sometimes set wrong proxy configs although none are actually needed. This command will delete the configured proxy.
Please comment your results if you have done this.
更多推荐
发布评论