gpt4 book ai didi

node.js - 开玩笑- map : @providesModule naming collision

转载 作者:搜寻专家 更新时间:2023-10-31 22:21:06 28 4
gpt4 key购买 nike

当我运行 npm start 或 react-native start 时,我收到了这个警告:

jest-haste-map: @providesModule naming collision:
Duplicate module name: core-js
Paths: {path_to_project}/node_modules/react-native/node_modules/core-js/package.json collides with {path_to_project}/node_modules/react-native/node_modules/fbjs/node_modules/core-js/package.json

This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
Duplicate module name: base64-js
Paths: {path_to_project}/node_modules/react-native/node_modules/base64-js/package.json collides with {path_to_project}/node_modules/react-native/node_modules/simple-plist/node_modules/base64-js/package.json

This warning is caused by a @providesModule declaration with the same name across two different files.

这是我的 package.json 文件

{
"name": "ProjectName",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"chroma-js": "^1.3.4",
"crypto-js": "^3.1.9-1",
"mobile-center": "^0.7.0",
"mobile-center-analytics": "^0.7.0",
"mobile-center-crashes": "^0.7.0",
"mobx": "^3.1.10",
"mobx-react": "^4.1.8",
"react": "16.0.0-alpha.12",
"react-addons-shallow-compare": "^15.5.2",
"react-mixin": "^2.0.2",
"react-native": "^0.45.1",
"react-native-animatable": "^1.2.2",
"react-native-baidu-map": "^0.6.0",
"react-native-linear-gradient": "^2.0.0",
"react-native-root-toast": "^1.1.2",
"react-native-smart-splash-screen": "^2.3.4",
"react-native-vector-icons": "^4.2.0",
"react-navigation": "^1.0.0-beta.11",
"react-timer-mixin": "^0.13.3",
"realm": "^1.10.0"
},
"devDependencies": {
"babel-jest": "20.0.3",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-preset-react-native": "2.0.0",
"jest": "20.0.4",
"react-test-renderer": "16.0.0-alpha.12"
},
"jest": {
"preset": "react-native"
}
}

我的开发环境是:

node: v6.11.2
npm: 3.10.10
os: macOS Sierra

我已经尝试过任何方法,例如更新RN版本,清除watchMan缓存,指定所有依赖项的版本,调整devDependencies的版本像babel-jest的版本,但都不起作用。我不知道出了什么问题,我需要帮助。或者这是否是一个问题。

任何事情都是感激的!

最佳答案

可能您生成了带有名称的项目,然后将 package.json 中的 name 属性更改为不同的名称。

检查 app.jsonpackage.json 文件,看看您的应用程序的所有文件是否具有相同的项目名称

关于node.js - 开玩笑- map : @providesModule naming collision,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45790702/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com