I need to download react-navigation and using the command npm i #react-navigation/native and it is showing an error - react-native

PS E:\React Native\contacts> npm i #react-navigation/native
npm WARN jscodeshift#0.11.0 requires a peer of #babel/preset-env#^7.1.6 but none is installed. You must install peer dependencies yourself.
npm WARN react-native#0.64.2 requires a peer of react#17.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-shallow-renderer#16.14.1 requires a peer of react#^16.0.0 || ^17.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-test-renderer#17.0.1 requires a peer of react#17.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN tsutils#3.21.0 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 WARN use-subscription#1.5.1 requires a peer of react#^16.8.0 || ^17.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #react-navigation/native#5.9.4 requires a peer of react#* but none is installed. You
must install peer dependencies yourself.
npm WARN #react-navigation/core#5.15.3 requires a peer of react#* but none is installed. You must install peer dependencies yourself.
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path E:\React Native\contacts\node_modules#react-navigation\core\node_modules\react-is
npm ERR! dest E:\React Native\contacts\node_modules#react-navigation\core\node_modules.react-is.DELETE
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, rename 'E:\React Native\contacts\node_modules#react-navigation\core\node_modules\react-is' -> 'E:\React Native\contacts\node_modules#react-navigation\core\node_modules.react-is.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\Hello\AppData\Roaming\npm-cache_logs\2021-06-10T04_29_31_173Z-debug.log

The reason behind this is that npm deprecated [auto-installing of peerDependencies] since npm#3, so required peer dependencies like babel-core and webpack must be listed explicitly in your package.json.
All that you need to do is to install babel-core.
https://github.com/npm/npm/issues/6565

I think there is running android emulator, try to close all of android related consoles and retry the installation.

the solution of error to install NPM navigation dependencies packages:
choose one of these!
1: upgrade #react-native-community/masked-view to the latest package which is accepting by react#16 and react#17.
2: downgrade your root project's react version to 16
I hope this is helpful.

I solved this error.
just run the command as globally
npm install -g #react-navigation/native
May be it shows some warnings but still your package will be installed

Related

Why can't I install bootstrap-vue

I'm trying to install bootstrap-vue to my vue project, using the command npm install bootstrap-vue bootstrap but I get this mysterious error.
npm WARN deprecated popper.js#1.16.1: You can find the new Popper v2 at #popperjs/core, this package is dedicated to the legacy v1
npm WARN #vue/cli-plugin-typescript#4.5.7 requires a peer of #vue/compiler-sfc#^3.0.0-beta.14 but none is installed. You must install peer dependencies yourself.
npm WARN #vue/cli-service#4.5.7 requires a peer of #vue/compiler-sfc#^3.0.0-beta.14 but none is installed. You must install peer dependencies yourself.
npm WARN jsdom#15.2.1 requires a peer of canvas#^2.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN ws#7.3.1 requires a peer of bufferutil#^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws#7.3.1 requires a peer of utf-8-validate#^5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN bootstrap#4.5.3 requires a peer of jquery#1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
npm ERR! path C:\Users\roeir\OneDrive\שולחן העבודה\Programming stuff\Chatting app\chat-client\node_modules\#nuxt\opencollective\node_modules\chalk
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\roeir\OneDrive\שולחן העבודה\Programming stuff\Chatting app\chat-client\node_modules\#nuxt\opencollective\node_modules\chalk' -> 'C:\Users\roeir\OneDrive\שולחן העבודה\Programming stuff\Chatting app\chat-client\node_modules\#nuxt\opencollective\node_modules\.chalk.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\roeir\AppData\Roaming\npm-cache\_logs\2020-11-08T14_54_53_107Z-debug.log
this is my directory C:\Users\roeir\OneDrive\שולחן העבודה\Programming stuff\Chatting app\chat-client
Did you try:
npm i bootstrap-vue
Had the same issue and this (found on https://www.npmjs.com/package/bootstrap-vue) solved my problem.

installing node dependencies manually

As I've learned from SO topics dependencies for node aren't installed automatically on the fly since npm version 3. I'm running version 3.5.2 and I get these warnings when running npm install --no-optional:
npm WARN eslint-config-react-app#5.0.2 requires a peer of #typescript-eslint/eslint-plugin#2.x but none was installed.
npm WARN eslint-config-react-app#5.0.2 requires a peer of #typescript-eslint/parser#2.x but none was installed.
npm WARN eslint-config-react-app#5.0.2 requires a peer of eslint#6.x but none was installed.
npm WARN ts-pnp#1.1.2 requires a peer of typescript#* but none was installed.
npm WARN tsutils#3.17.1 requires a peer of typescript#>=2.8.0 || >= 3.2.0-dev
npm ERR! Missing: react-router-dom#^5.1.2
npm ERR! Invalid: lock file's #typescript-eslint/eslint-plugin#1.13.0 does not satisfy #typescript-eslint/eslint-plugin#2.8.0
npm ERR!
How do I install these manually ?
I tried:
npm install #typescript-eslint/eslint-plugin#2.*
npm install eslint#6.*
npm install typescript#*
but that did no good. Still throws those warnings.
I got little bit further:
npm ERR! code ETARGET
npm ERR! notarget No matching version found for #typescript-eslint/eslint-plugin#^5.16.0.
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! notarget
npm ERR! notarget It was specified as a dependency of 'client'
npm ERR! notarget
npm ERR! A complete log of this run can be found in:
npm ERR! /home/mark/.npm/_logs/2019-10-04T20_26_24_111Z-debug.log
Please use the following for each peer dependency to install that and remove the error.
$ npm install --save-dev #typescript-eslint
For another error,
No matching version found for #typescript-eslint/eslint-plugin#^5.16.0.
Please run npm view #typescript-eslint/eslint-plugin.
Then, you can see that highest version of #typescript-eslint/eslint-plugin is 2.3.2 now. This #typescript-eslint/eslint-plugin#^5.16.0 version not exists.

How to import dependency into React Native Project?

I’m having trouble adding a dependency to my React (Native) project. I’m trying to use createBottomMaterialNavigator, and the docs say it needs a certain library and says to install it thusly: npm install react-navigation-material-bottom-tabs react-native-paper
I’ve run this, and also run it with npm install --save ...etc. First of all, I don’t see any change in my package.json file where I’d expect to see the new library show up, right?
When I add import { createMaterialBottomTabNavigator } from "react-navigation-material-bottom-tabs"; to my project, I get an error that the module does not exist. (which does make sense)
Can anyone help me figure out what I’m doing wrong?
UPDATE: I've tried npm link, no luck:
sudo npm link react-navigation-material-bottom-tabs react-native-paper
Password:
npm WARN react-navigation-material-bottom-tabs#1.0.0 requires a peer of react#* but none is installed. You must install peer dependencies yourself.
npm WARN react-navigation-material-bottom-tabs#1.0.0 requires a peer of react-native#* but none is installed. You must install peer dependencies yourself.
npm WARN react-navigation-material-bottom-tabs#1.0.0 requires a peer of react-native-paper#^2.2.2 but none is installed. You must install peer dependencies yourself.
npm WARN react-navigation-material-bottom-tabs#1.0.0 requires a peer of react-navigation#>=2.0 || ^2.0.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN react-navigation-tabs#1.0.0 requires a peer of react#* but none is installed. You must install peer dependencies yourself.
npm WARN react-navigation-tabs#1.0.0 requires a peer of react-native#* but none is installed. You must install peer dependencies yourself.
npm WARN react-navigation-tabs#1.0.0 requires a peer of react-native-screens#^1.0.0 || ^1.0.0-alpha but none is installed. You must install peer dependencies yourself.
npm WARN react-native-tab-view#1.3.4 requires a peer of react#* but none is installed. You must install peer dependencies yourself.
npm WARN react-native-tab-view#1.3.4 requires a peer of react-native#* but none is installed. You must install peer dependencies yourself.
+ react-navigation-material-bottom-tabs#1.0.0
added 10 packages from 5 contributors in 1.023s
/Users/TuzMacbookPro2017/Library/Mobile Documents/com~apple~CloudDocs/Development/QMG/Learning/Tuz1App/node_modules/react-navigation-material-bottom-tabs -> /usr/local/lib/node_modules/react-navigation-material-bottom-tabs
> fsevents#1.2.7 install /usr/local/lib/node_modules/react-native-paper/node_modules/fsevents
> node install
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for fsevents#1.2.7 and node#11.12.0 (node-v67 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/lib/node_modules/react-native-paper/node_modules/fsevents/lib'
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/react-native-paper/node_modules/fsevents/build'
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/lib/node_modules/react-native-paper/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node" "--module_name=fse" "--module_path=/usr/local/lib/node_modules/react-native-paper/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64" "--napi_version=4" "--node_abi_napi=napi"
gyp ERR! cwd /usr/local/lib/node_modules/react-native-paper/node_modules/fsevents
gyp ERR! node -v v11.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/react-native-paper/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/usr/local/lib/node_modules/react-native-paper/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/react-native-paper/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:197:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:988:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
node-pre-gyp ERR! System Darwin 18.2.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/react-native-paper/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/react-native-paper/node_modules/fsevents
node-pre-gyp ERR! node -v v11.12.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/react-native-paper/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node --module_name=fse --module_path=/usr/local/lib/node_modules/react-native-paper/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
npm WARN react-native-paper#2.14.0 requires a peer of react#* but none is installed. You must install peer dependencies yourself.
npm WARN react-native-paper#2.14.0 requires a peer of react-native#* but none is installed. You must install peer dependencies yourself.
npm WARN react-native-paper#2.14.0 requires a peer of react-native-vector-icons#* but none is installed. You must install peer dependencies yourself.
npm WARN react-native-safe-area-view#0.12.0 requires a peer of react#* but none is installed. You must install peer dependencies yourself.
npm WARN react-native-safe-area-view#0.12.0 requires a peer of react-native#* but none is installed. You must install peer dependencies yourself.
npm WARN create-react-context#0.2.3 requires a peer of react#^0.14.0 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #callstack/react-theme-provider#1.0.7 requires a peer of react#^15.3.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 (node_modules/react-native-paper/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ react-native-paper#2.14.0
added 231 packages from 217 contributors in 9.078s
npm ERR! Link target resolves to the same directory as link source: /usr/local/lib/node_modules/react-native-paper
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/TuzMacbookPro2017/.npm/_logs/2019-03-22T16_09_34_044Z-debug.log

react-native-reanimated#1.0.0-alpha.10 requires a peer of react#16.0.0-alpha.6

I want to create an app available on Android and iOS. I have a background using Android Studio but I am new with cross-platform development.
I just install node.js v10.15.0npm.
I also installed Atom and Nuclide.
I put install -g create-react-native-app in my terminal and I create my first app Dimitest : create-react-native-app Dimitest.
I choosed expo-template-blank for my template.
But then several warnings appear and I really do not know how to fix them.
Can someone help me ?
npm WARN react-native-reanimated#1.0.0-alpha.10 requires a peer of react#16.0.0-alpha.6 but none is installed. You must install peer
dependencies yourself.
npm WARN react-native-reanimated#1.0.0-alpha.10 requires a peer of react-native#^0.44.1 but none is installed. You must install peer
dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current:
{"os":"win32","arch":"x64"})
Then I tried npm start and this then appeared:
npm ERR! path C:\Users\melis\Documents\Projet_react_dimi\package.json
npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall open npm
ERR! enoent ENOENT: no such file or directory, open
'C:\Users\melis\Documents\Projet_react_dimi\package.json' 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\melis\AppData\Roaming\npm-cache_logs\2018-12-28T16_35_44_491Z-debug.log

Cannot install react navigation ({react native})

Cannot install react navigation, error is as below,
F:\Test2>npm install --save react-navigation
npm WARN #babel/plugin-check-constants#7.0.0-beta.38 requires a peer of #babel/core#7.0.0-beta.38 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-screens#1.0.0-alpha.9 requires a peer of react#16.0.0-alpha.6 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-screens#1.0.0-alpha.9 requires a peer of react-native#^0.44.1 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Error: EPERM: operation not permitted, rename 'F:\Test2\node_modules\.staging\fsevents-db169078\node_modules\nopt' -> 'F:\Test2\node_modules\.staging\nopt-ec00ee2d'
npm ERR! path F:\Test2\node_modules\hoist-non-react-statics
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'F:\Test2\node_modules\hoist-non-react-statics' -> 'F:\Test2\node_modules\.hoist-non-react-statics.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\usman\AppData\Roaming\npm-cache\_logs\2018-09-13T04_40_04_090Z-debug.log
Any help would be appreciated
First try
npm install -g react-navigation
Or next :
Try installing
npm install #react-navigation/native
First take a backup of all the dependencies in node modules.
Take information about package.json
with this file u can able to know which dependcies are already install if require u can reinstall npm then again do npm install#react-navigation/native
It seems the hoist-non-react-statics package is incorrect. So you could re-install it or re-install the whole node_modules.
First of all, backup your node_modules folder. This is very important!
Then delete node_modules folder and re-install the npm packages with npm install.
After above operation, try installing react-navigation again.