question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warning with react-native dependencies

See original GitHub issue

Hello,

we have a warning related to react-native in dev

https://github.com/kevlened/isomorphic-webcrypto/blob/734d23cf628c07a265366725d91e04aa9089fc7f/package.json#L66

we are using vue with pubnub, why those dependencies are in dev and not in optional ?

pubnub@4.29.11
    └─┬ isomorphic-webcrypto@2.3.6
      └── @unimodules/react-native-adapter@6.1.0

For what i understand you need it in your tests, so you could install it in your test scripts, like in the .travis.yml file with a :

npm i react-native --no-save

thanks

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kevlenedcommented, Feb 26, 2021

That’s fair, I’ll move react-native to optional.

0reactions
lk77commented, Mar 1, 2021

I believe my issue was misleading, sorry,

it’s seems that the warning is caused by this optional dependency : @unimodules/react-native-adapter

you could try to do something like that :

"peerDependencies": { 
  "@unimodules/react-native-adapter": "*",
},
"peerDependenciesMeta": {
  "@unimodules/react-native-adapter": {
    "optional": true
  }
}

i think npm will not install it and will not warn the end user about it

i made a fork : https://github.com/lk77/isomorphic-webcrypto and it seems to work

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is there a way to avoid package dependency warnings in ...
2 Answers 2 ... 'npm audit fix' This command can rather show the user a bad error. This is not the recommended method....
Read more >
react-native-warnings - npm
Warning library for react native. ... Start using react-native-warnings in your project by running `npm i react-native-warnings`.
Read more >
Warning: 'react-native' dependency is not installed · Issue #876
Whenever I create a project with either I see a this text : Warning: 'react-native' dependency is not installed. If there is an...
Read more >
Troubleshooting - React Native
If you added React Native manually to your project, make sure you have included all the relevant dependencies that you are using, like...
Read more >
Getting started | React Navigation
React Navigation is born from the React Native community's need for an ... Note: You might get warnings related to peer dependencies after...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found