我使用以下命令来 react 应用程序路由。
npm 我 react -native-router-flux --save
然后我通过“npm start”重新启动 npm 并收到此错误
无法从“node_modules\react-navigation-stack\lib\module\views\StackView\StackViewCard.js”解析“react-native-screens” 构建 JavaScript 包失败。
如何修复此错误?我还更新了 npm。
这是package.json文件
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"expo": "~36.0.0",
"react": "~16.9.0",
"react-dom": "~16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz",
"react-native-router-flux": "^4.2.0",
"react-native-web": "~0.11.7"
},
"devDependencies": {
"babel-preset-expo": "~8.0.0",
"@babel/core": "^7.0.0"
},
"private": true
}
最佳答案
我使用的是React Native官方导航。它确实很有帮助并且易于使用。 访问https://facebook.github.io/react-native/docs/navigation
关于javascript - 如何修复无法从 "react-native-screens"解析 "node_modules\react-navigation-stack\lib\module\views\StackView\StackViewCard.js"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60328473/