Dan*_*iel 8 xcode ipa react-native
我需要生成.ipa
我的项目具有的不同目标中的一个,但是无论是在命令行中还是通过 Xcode 执行,我都会继续收到以下错误:
jest-haste-map: Haste module naming collision: react-native
The following files share their name; please adjust your hasteImpl:
* <rootDir>/node_modules/react-native/package.json
* <rootDir>/ios/build/Archive/DEV.xcarchive/Products/Applications/DEV.app/assets/node_modules/react-native/package.json
Failed to construct transformer: { Error: Duplicated files or mocks. Please check the console for more info
at setModule (/Users/danale/Projects/NFIBEngage/node_modules/jest-haste-map/build/index.js:620:17)
at workerReply (/Users/danale/Projects/NFIBEngage/node_modules/jest-haste-map/build/index.js:691:9)
at process._tickCallback (internal/process/next_tick.js:68:7)
mockPath1: 'node_modules/react-native/package.json',
mockPath2:
'ios/build/Archive/DEV.xcarchive/Products/Applications/DEV.app/assets/node_modules/react-native/package.json' }
Run Code Online (Sandbox Code Playgroud)
我已经尝试过创建这样的rn-cli.config.js
文件:
const blacklist = require("metro-config/src/defaults/blacklist");
module.exports = {
resolver: {
blacklistRE: blacklist([/nodejs-assets\/.*/, /android\/.*/, /ios\/.*/])
}
};
Run Code Online (Sandbox Code Playgroud)
或这个:
const blacklist = require("metro-config/src/defaults/blacklist");
module.exports = {
resolver: {
blacklistRE: blacklist([/node_modules\/.*\/node_modules\/react-native\/.*/])
}
};
Run Code Online (Sandbox Code Playgroud)
这两个都不适合我。我也有一个metro.config.js
:
/**
* Metro configuration for React Native
* https://github.com/facebook/react-native
*
* @format
*/
module.exports = {
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false,
},
}),
},
};
Run Code Online (Sandbox Code Playgroud)
这里的步骤对我不起作用:
如何修复 React Native 错误“jest-haste-map:Haste 模块命名冲突”?
错误:jest-haste-map:Haste 模块命名冲突:
我试过运行一个,rm -rf ios/build
但最终当它被重新创建时,错误返回。
有效的是运行以下命令:
rm ios/build/Archive/DEV.xcarchive/Products/Applications/DEV.app/assets/node_modules/react-native/package.json
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
5085 次 |
最近记录: |