`npm install` завершается ошибкой при` git submodule update` - PullRequest
0 голосов
/ 18 февраля 2019

У меня есть приложение с нативной реакцией с несколькими зависимостями, размещенное в AWS CodeCommit.

Я работаю над этим проектом некоторое время, но после недавнего обновления узла & 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

Здесь ссылка на полный файл журнала.

Как вы можете видеть, я работаю на компьютере с Windows.Когда я пытаюсь собрать приложение на MacOS, оно отлично работает.Я пробовал разные версии Node, NPM & Git, но ошибка не исчезла.

Я подозреваю, что это проблема, связанная с Windows, но не знаю, как это исправить.

1 Ответ

0 голосов
/ 19 февраля 2019

Хорошо.Я нашел проблему и обходной путь.

Проблема заключалась в том, что мы использовали нашу разветвленную версию react-native-fast-image &, которая вызвала ошибку при выполнении npm-install.Я клонировал наш форк репо и связал его в package.json как -

"react-native-fast-image": "file:../react-native-fast-image",

вместо -

"react-native-fast-image": "git+https://github.com/{account-name}/react-native-fast-image.git",

, что решило проблему на данный момент.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...