错误:“软件包仪器函数都被忽略了,因为它包含无效的配置。 - 仅发生在Mac M1上,而不是在Windows上
当我尝试在Mac M1上的Android和iOS中构建React Antive应用程序时,我会遇到此错误.....在Windows上构建时不会发生这种错误:
Package firebase-functions has been ignored because it contains invalid configuration. Reason: Package subpath './package.json' is not defined by "exports" in /Users/..../node_modules/firebase-functions/package.json
我查看了我的节点模块文件夹,在路径上确实有一个软件包。 以下是我的包裹。
"dependencies": {
"@react-native-community/geolocation": "^2.0.2",
"@react-native-community/masked-view": "^0.1.11",
"@react-native-community/push-notification-ios": "^1.10.1",
"@react-native-firebase/app": "^14.5.1",
"@react-native-firebase/auth": "^14.5.1",
"@react-native-firebase/database": "^14.5.1",
"@react-native-firebase/storage": "^14.5.1",
"@react-native-google-signin/google-signin": "^7.2.2",
"@react-native-picker/picker": "^2.3.1",
"@sentry/react-native": "^3.3.0",
"firebase-functions": "^3.20.1",
"flow": "^0.2.3",
"flow-bin": "^0.173.0",
"prop-types": "^15.8.1",
"react": "17.0.2",
"react-native": "0.67.0",
"react-native-background-timer": "^2.4.1",
"react-native-crypto-js": "^1.0.0",
"react-native-elements": "^3.4.2",
"react-native-fbsdk": "^3.0.0",
"react-native-form-validator": "^0.5.1",
"react-native-fs": "^2.19.0",
"react-native-gesture-handler": "^2.3.0",
"react-native-gifted-chat": "^0.16.3",
"react-native-google-places-autocomplete": "^2.4.1",
"react-native-image-crop-picker": "^0.37.3",
"react-native-maps": "^0.30.1",
"react-native-permissions": "^3.3.0",
"react-native-phone-number-input": "^2.1.0",
"react-native-push-notification": "^8.1.1",
"react-native-reanimated": "^1.13.4",
"react-native-safe-area-context": "^4.1.2",
"react-native-screens": "^3.13.1",
"react-native-sound": "^0.11.2",
"react-native-switch": "^1.5.1",
"react-native-vector-icons": "^9.1.0",
"react-navigation": "^4.4.4",
"react-navigation-stack": "^2.10.4",
"react-navigation-tabs": "^2.11.2",
"react-redux": "^7.2.6",
"redux": "^4.1.2",
"redux-thunk": "^2.4.1",
"symbol-observable": "^4.0.0",
"twitter-lite": "^1.1.0"
},
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
处理
节点软件包
时,请确保以下步骤:删除
package> package> package -lock.json
- 如果此文件使用其他操作系统启动,则有可能有些依赖关系是使用错误的配置安装手动删除
node_modules
folder folder- in为了删除当前设置(可能包括几个模块的错误安装)使用
npm install
重新安装 - 这应该重新创建package-lock.json
文件以及当前OS的相关除法
我的个人提示:添加 相关的deendencies
package-lock.json
togit.ignore
文件,以便在项目从一个开发人员(使用某些OS)移动到其他开发人员(可以使用一个开发人员(使用某个OS)时不同的操作系统)When handling
node packages
please ensure the following steps:Remove
package-lock.json
- if this file originated using a different OS there is a chance that some dependencies are installed with wrong configurationManually remove
node_modules
folder - in order to remove current setup (it may include wrong installation of several modules)Reinstall using
npm install
- this should re-createpackage-lock.json
file as well as relevant deendencies for current OSMy personal tip: add
package-lock.json
togit.ignore
file in order to prevent wrong setup when project moves from one developer (using some OS) to a different developer (which may use a different OS)