問題:試圖運行命令行react-native run-ios
時如何使反應天然打包忽略某些目錄
我的項目有一個@providesModule naming collision
。它與由另一個npm包esdoc創建的自動生成目錄dist/
相沖突。我希望能夠保留這個自動生成的目錄,只是讓原本的封裝程序忽略dist/
目錄。
錯誤消息:
[01/23/2017, 13:17:07] <START> Building Haste Map
Failed to build DependencyGraph: @providesModule naming collision:
Duplicate module name: ann
Paths: /Users/thurt/projects/example/package.json collides with /Users/thurt/projects/example/dist/esdoc/package.json
This error is caused by a @providesModule declaration with the same name across two different files.
Error: @providesModule naming collision:
Duplicate module name: ann
Paths: /Users/thurt/projects/example/package.json collides with /Users/thurt/projects/example/dist/esdoc/package.json
This error is caused by a @providesModule declaration with the same name across two different files.
at HasteMap._updateHasteMap (/Users/thurt/projects/example/node_modules/react-native/packager/react-packager/src/node-haste/DependencyGraph/HasteMap.js:158:13)
at p.getName.then.name (/Users/thurt/projects/example/node_modules/react-native/packager/react-packager/src/node-haste/DependencyGraph/HasteMap.js:133:31)
感謝來搶!對於我的情況,我所需要做的就是包含'--reset-cache'標誌。現在看來我的'rn-cli.config.js'文件被自動使用了,所以我不需要'--config = rn-cli.config.js'。 成功通過打包程序後,我仍然在應用程序第一次嘗試加載時出現「模塊未找到」錯誤。 我將項目文件夾名稱添加到黑名單正則表達式的開頭,該黑名單似乎解決了該問題。我想我需要確保包裝工程師不會忽略像/node_modules//dist/ –
thurt
這樣的文件夾,您使用哪個版本? –
@GuySegal rn 0.40.0 – thurt