Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/396.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 尝试安装react导航栏时出现警告和错误_Javascript_Reactjs_React Native_Navigation_Warnings - Fatal编程技术网

Javascript 尝试安装react导航栏时出现警告和错误

Javascript 尝试安装react导航栏时出现警告和错误,javascript,reactjs,react-native,navigation,warnings,Javascript,Reactjs,React Native,Navigation,Warnings,我尝试将我的应用程序添加到导航栏。我需要安装这个反应本机酒吧 我在控制台上写道: npm install react-native-navigation-bar --save 以下是资源: npm WARN @react-navigation/bottom-tabs@5.10.0 requires a peer of @react-navigation/native@^5.0.5 but none is installed. You must install peer dependencies

我尝试将我的应用程序添加到导航栏。我需要安装这个反应本机酒吧

我在控制台上写道:

npm install react-native-navigation-bar --save
以下是资源:

npm WARN @react-navigation/bottom-tabs@5.10.0 requires a peer of @react-navigation/native@^5.0.5 but none is installed. You must install peer dependencies yourself.
npm WARN @react-navigation/bottom-tabs@5.10.0 requires a peer of react-native@* but none is installed. You must install peer dependencies yourself.
npm WARN @react-navigation/bottom-tabs@5.10.0 requires a peer of react-native-safe-area-context@>= 0.6.0 but none is installed. You must install peer dependencies yourself.     
npm WARN @react-navigation/bottom-tabs@5.10.0 requires a peer of react-native-screens@>= 2.0.0-alpha.0 || >= 2.0.0-beta.0 || >= 2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-iphone-x-helper@1.3.0 requires a peer of react-native@>=0.42.0 but none is installed. You must install peer dependencies yourself.
npm WARN tsutils@3.17.1 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.

npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path C:\Users\atalay\octobil_react\node_modules\react-native-navigation-bar
npm ERR! dest C:\Users\atalay\octobil_react\node_modules\.react-native-navigation-bar.DELETE
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\atalay\octobil_react\node_modules\react-native-navigation-bar' -> 'C:\Users\atalay\octobil_react\node_modules\.react-native-navigation-bar.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\atalay\AppData\Roaming\npm-cache\_logs\2020-10-25T18_59_31_615Z-debug.log

C:\Users\atalay\octobil_react>npm install react-native-navigation-bar@^5.0.5 --save
npm ERR! code ETARGET
npm ERR! notarget No matching version found for react-native-navigation-bar@5.0.5.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\atalay\AppData\Roaming\npm-cache\_logs\2020-10-25T19_06_50_941Z-debug.log

Packages.json:

"dependencies": {
    "@react-native-community/masked-view": "^0.1.10",
    "@react-navigation/bottom-tabs": "^5.10.0",
    "@react-navigation/native": "^5.8.0",
    "@react-navigation/stack": "^5.10.0",
    "@testing-library/jest-dom": "^5.11.5",
    "@testing-library/react": "^11.1.0",
    "@testing-library/user-event": "^12.1.10",
    "navigationbar-react-native": "0.0.5",
    "react": "^17.0.1",
    "react-dom": "^17.0.1",
    "react-native": "^0.63.3",
    "react-native-gesture-handler": "^1.8.0",
    "react-native-navigation-bar": "^0.2.1",
    "react-native-reanimated": "^1.13.1",
    "react-native-safe-area-context": "^3.1.8",
    "react-native-screens": "^2.11.0",
    "react-navigation": "^4.4.2",
    "react-navigation-stack": "^2.8.4",
    "react-scripts": "4.0.0",
    "typescript": "^4.0.3",
    "web-vitals": "^0.2.4"
  },

它看起来还可以,但是它的未能编译

此软件包依赖于其他几个软件包才能工作,只需首先使用npm安装这些软件包

npm i @react-navigation/native react-native react-native-safe-area-context react-native-screens typescript

看起来它试图安装5.0.5,如果你想在这里安装这个,它似乎只在0.2.1上。你的package.json看起来怎么样?我做了,但没有做任何改变,完全清除了你的包锁和节点模块