I cannot add the React-navigation library to my React-Native project!

Asked

Viewed 47 times

0

I’m trying to use Yarn add React-navigation in my project, but I can’t add the library keeps popping up this error. I have already deleted package.lock.js, however error still appears.

info [email protected]: The platform "linux" is incompatible with this module.

info "[email protected]" is an optional dependency and failed compatibility check. 

Excluding it from installation.

error An unexpected error occurred: "EACCES: permission denied, unlink '/home/lucas/App/mobile/node_modules/.yarn-integrity'".

info If you think this is a bug, please open a bug report with the information provided in "/home/lucas/App/mobile/yarn-error.log".

info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

1 answer

0

Delete the folder node_modules and the package.lock.js again. With the command

sudo rm -r node_modules package.lock.js

After that run Yarn without using sudo. The following command

$ yarn install

The dollar sign $ is only to represent that must be run as common user.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.