我正在尝试在Azure上构建一个Node.js网站。在部署期间,我收到此错误:
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "D:\\Program Files (x86)\\nodejs\\0.12.6\\node.exe" "D:\\Program Files (x86)\\npm\\2.11.2\\node_modules\\npm\\bin\\npm-cli.js" "install" "--production"
npm ERR! node v0.12.6
npm ERR! npm v2.11.2
npm ERR! path D:\home\site\wwwroot\node_modules\socketio-jwt\node_modules\jsonwebtoken\node_modules\jws\node_modules\base64url\node_modules\meow\node_modules\indent-string\node_modules\repeating\node_modules\is-finite\node_modules\number-is-nan\package.json.5f81d88f6c51ba4596881f5ad60cfe9c
npm ERR! code EINVAL
npm ERR! errno -4071
npm ERR! EINVAL, rename 'D:\home\site\wwwroot\node_modules\socketio-jwt\node_modules\jsonwebtoken\node_modules\jws\node_modules\base64url\node_modules\meow\node_modules\indent-string\node_modules\repeating\node_modules\is-finite\node_modules\number-is-nan\package.json.5f81d88f6c51ba4596881f5ad60cfe9c'
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! D:\home\site\wwwroot\npm-debug.log
Failed exitCode=-4071, command="D:\Program Files (x86)\nodejs\0.12.6\node.exe" "D:\Program Files (x86)\npm\2.11.2\node_modules\npm\bin\npm-cli.js" install --production
An error has occurred during web site deployment.
我的应用已上传到Azure [this way](通过git)
任何想法可能出错?在我的计算机上,应用程序运行良好。
答案 0 :(得分:1)
更有可能的是,路径太长了。我相信Windows上的最大路径长度是255个字符左右。日志输出中的rename()
路径为276个字符。