【发布时间】:2019-02-18 15:36:45
【问题描述】:
我有一个 react-native 应用程序,其中一些依赖项托管在 AWS CodeCommit 上。
我已经在这个项目上工作了一段时间,但是在最近升级 node 和 npm 之后,我无法运行该应用程序。它卡在npm install。这是错误 -
npm ERR! code 1
npm ERR! Command failed: git submodule update -q --init --recursive
npm ERR! warning: templates not found in C:\Users\myComputer\AppData\Local\Temp\pacote-git-template-tmp\git-clone-c78347e9
npm ERR! warning: unable to access 'Examples/SDWebImage TV Demo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/.gitattributes': Filename too long
npm ERR! warning: unable to access 'Examples/SDWebImage TV Demo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/.gitattributes': Filename too long
npm ERR! error: unable to create file Examples/SDWebImage TV Demo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json: Filename too long
npm ERR! warning: unable to access 'Examples/SDWebImage TV Demo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/.gitattributes': Filename too long
npm ERR! error: unable to create file Examples/SDWebImage TV Demo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json: Filename too long
npm ERR! warning: unable to access 'Examples/SDWebImage TV Demo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/.gitattributes': Filename too long
npm ERR! warning: unable to access 'Examples/SDWebImage TV Demo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/.gitattributes': Filename too long
npm ERR! error: unable to create file Examples/SDWebImage TV Demo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json: Filename too long
npm ERR! warning: unable to access 'Examples/SDWebImage TV Demo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/.gitattributes': Filename too long
npm ERR! error: unable to create file Examples/SDWebImage TV Demo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json: Filename too long
npm ERR! Unable to checkout 'dc5c974b89509992d6c6e0d0510344fd0e35baa6' in submodule path 'ios/Vendor/SDWebImage'
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\myComputer\AppData\Roaming\npm-cache\_logs\2019-02-18T15_22_41_579Z-debug.log
Here 是完整日志文件的链接。
如您所见,我正在使用 Windows 机器。当我尝试在 MacOS 上构建应用程序时,它运行良好。 我尝试了不同版本的 Node、NPM 和 Git,但错误仍然存在。
我怀疑这是与 Windows 相关的问题,但不知道如何解决。
【问题讨论】:
-
你试过清理缓存吗?
npm cache clean --force删除node_modules文件夹并重新安装所有软件包? -
@Maielo 也尝试过
npm cache clean --force。没用
标签: react-native npm