1

Cannot install react navigation, error is as below,

   F:\Test2>npm install --save react-navigation
    npm WARN @babel/[email protected] requires a peer of @babel/[email protected] but none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] 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: [email protected] (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

1
  • anyhelp would be highly appreciated Commented Sep 13, 2018 at 4:49

2 Answers 2

2

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

Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.