cha*_*vdw 16 packager node.js npm react-native
这在开发过程中似乎是随机发生的.当试图运行npm start或者react-native run-ios,我得到以下错误:
Failed to build DependencyGraph: @providesModule naming collision:
Duplicate module name: react-native-vector-icons
Paths: /Users/chandlervdw/Repos/Relay/mobile/node_modules/react-native/local-cli/rnpm/core/test/fixtures/files/package.json collides with /Users/chandlervdw/Repos/Relay/mobile/node_modules/react-native/Libraries/Animated/release/package.json
This error is caused by a @providesModule declaration with the same name accross two different files.
Error: @providesModule naming collision:
Duplicate module name: react-native-vector-icons
Paths: /Users/chandlervdw/Repos/Relay/mobile/node_modules/react-native/local-cli/rnpm/core/test/fixtures/files/package.json collides with /Users/chandlervdw/Repos/Relay/mobile/node_modules/react-native/Libraries/Animated/release/package.json
This error is caused by a @providesModule declaration with the same name accross two different files.
at HasteMap._updateHasteMap (/Users/chandlervdw/Repos/Relay/mobile/node_modules/node-haste/lib/DependencyGraph/HasteMap.js:162:15)
at /Users/chandlervdw/Repos/Relay/mobile/node_modules/node-haste/lib/DependencyGraph/HasteMap.js:140:25
Run Code Online (Sandbox Code Playgroud)
奇怪的是,/Users/chandlervdw/Repos/Relay/mobile/node_modules/react-native/local-cli/rnpm/core/test/fixtures/files/package.json实际上列表react-native-vector-icons作为模块的名称???
如果我删除该文件,则错误不再发生,但打包器卡在93%并且抱怨找不到完全无关的库.
我吹走了我的仓库,甚至重新安装了所有东西,包括npm,rnpm甚至升级node.我正在运行与我的队友相同的所有版本,他们能够毫无问题地运行打包器.
发布此作为答案,以防万一其他人将来有这个问题.
当节点包管理器运行初始构建阶段时,npm start使用sudo权限运行将授予正确的权限.如果您运行的shell /用户具有受限制的权限,则似乎只会发生这种情况.强制升级sudo权限使包管理器完全控制以完成构建.
| 归档时间: |
|
| 查看次数: |
9255 次 |
| 最近记录: |