[英]this.getOptions not found in react-native-firebase
在我的本機應用程序中集成react-native-firebase
時,我在啟動應用程序時遇到以下錯誤
Module build failed (from ./node_modules/babel-loader/lib/index.js):
TypeError: this.getOptions is not a function
at Object.loader (/Users/nikhilfarheen/Documents/ReactComponent/sharespecs/node_modules/babel-loader/lib/index.js:46:28)
at Object.<anonymous> (/Users/nikhilfarheen/Documents/ReactComponent/sharespecs/node_modules/babel-loader/lib/index.js:41:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
安裝的包是
"dependencies": {
"@babel/plugin-transform-react-jsx": "^7.20.7",
"@react-native-firebase/app": "^16.5.0",
"@react-native-firebase/messaging": "^16.5.0",
"babel": "^6.23.0",
"babel-core": "^6.26.3",
"babel-loader": "^9.1.2",
"firebase": "^9.15.0",
"link": "^1.5.1",
"react-native": "^0.71.0",
"react-native-cli": "^2.0.1",
"react-native-device-info": "^10.3.0",
"style-loader": "2.0.0",
"webpack-stream": "^7.0.0"
}
嘗試安裝其他包的對等依賴項,如 webpack 但沒有任何效果
您錯過了下載依賴項。
按照以下步驟安裝官方文檔中提到的依賴項
npm uninstall babel-loader
npm install -D babel-loader @babel/core @babel/preset-env webpack
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.