在Windows/Azure中重命名长路径时,npm 3.x安装失败 [英] npm 3.x install fails on rename long paths in Windows/Azure

查看:177
本文介绍了在Windows/Azure中重命名长路径时,npm 3.x安装失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在部署node.js时,由于长路径,npm 3.x安装在Windows/Azure中重命名长路径失败:

npm 3.x install fails on rename long paths in Windows/Azure when deploying node.js due to long paths:

npm ERR! EINVAL: invalid argument, rename 'D:\home\site\wwwroot\node_modules\azure_util\node_modules\pkgcloud\node_modules\gcloud\node_modules\gapitoken\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' -> 'D:\home\site\wwwroot\node_modules\number-is-nan'

是否可以克服它或阻止npm重命名?

Is there away to overcome it or prevent npm from renaming?

推荐答案

我们找到了一个解决方案.看来npm 3.x只能在您从较旧的npm升级时才需要重命名长路径时,才出现这种情况.

We found a solution. It seems like npm 3.x is getting to this situation when it needs to rename a long path only when you upgrade from older npm.

意思是,由于我们已经使用较旧的npm运行了此部署,因此当我们升级到npm 3.6.0时,它试图弄平现有部署并崩溃了.

Meaning, since we already had this deployment running with an older npm, when we upgraded to npm 3.6.0 it tried to flatten the existing deployment and crashed.

解决方案只是删除node_modules并重新部署.

The solution was just to remove the node_modules and redeploy.

这篇关于在Windows/Azure中重命名长路径时,npm 3.x安装失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆