在添加react-native-push-notification和@react-native-community/push-notification-ios之后,我将面临以下错误:
Error: jest-haste-map: Haste module naming collision:
Duplicate module name: react-animated
Paths: /<projectPath>/node_modules/@react-native-community/push-notification-ios/node_modules/react-native/Libraries/Animated/release/package.json collides with /<projectPath>/node_modules/react-native/Libraries/Animated/release/package.json
This error is caused by `hasteImpl` returning the same name for different files.
at setModule (/<projectPath>/node_modules/jest-haste-map/build/index.js:569:17)
at workerReply (/<projectPath>/node_modules/jest-haste-map/build/index.js:641:9)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Promise.all (index 77)rn-cli.config.js没人帮上忙。
"react": "16.8.3",
"react-native": "0.59.10",
"@react-native-community/push-notification-ios": "^1.2.0",
"react-native-push-notification": "^3.5.2",发布于 2020-06-08 07:40:01
我确实把黑名单添加到了metro.config.js而不是rn-cli.config.js
// metro.config.js
var blacklist = require('metro-config/src/defaults/blacklist');
module.exports = {
resolver: {
blacklistRE: blacklist([
/node_modules\/.*\/node_modules\/react-native\/.*/,
])
},
};https://stackoverflow.com/questions/62256998
复制相似问题