Questions tagged [peer-dependencies]

99 questions
2
votes
0 answers

Yarn Workspaces: How to satisfy peer dependency?

I just started using Yarn workspaces and have two packages defined, let's call them Alpha and Beta. Beta depends on Alpha. Alpha has a peer dependency for somelib@^1.2.3, so I added somelib@^1.2.3 as dependency to Beta's package.json. When…
Sven
  • 12,997
  • 27
  • 90
  • 148
2
votes
0 answers

NPM how to resolve peer dependencies without --legacy-peer-deps flag

I have two questions, first is how did this happen, and second will be how can I fix this. So here's the story: I'm working in react-native and I'm a bit of a new developer so I happily chugged along without worrying about packages going out of…
2
votes
0 answers

proper arrangement of npm workspaces and peer dependencies

I built a vue3 component library, which is the root of my folder src/... package.json I added a demo app to the repository that just showcases components and aids in development of components. src/... package.json demo/... demo/package.json I…
stackoverfloweth
  • 6,669
  • 5
  • 38
  • 69
2
votes
5 answers

Overriding peer dependency error on npm install

I am trying to run npm install @react-navigation/native @react-navigation/native-stack but end up receiving these errors when doing so: npm WARN ERESOLVE overriding peer dependency npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm…
GameOn_Jon
  • 68
  • 1
  • 1
  • 8
2
votes
1 answer

npm ERR! How to install compiler-sfc that meets peer dependency with vue@2.6.14?

My packageJSON "devDependencies": { "@fortawesome/fontawesome-svg-core": "^1.2.35", "@fortawesome/free-solid-svg-icons": "^5.15.3", "@vue/compiler-sfc": "^3.0.11", "axios": "^0.21", "bootstrap": "^4.0.0", …
2
votes
0 answers

Making sure NPM dev dependencies match corresponding peer dependencies

I pretty much always end up adding my NPM modules peer dependencies to dev dependencies as well because I need the peer dependencies installed so I can run automated tests before building the package. This creates the problem that I might…
cyberixae
  • 843
  • 5
  • 15
2
votes
2 answers

How do you fix peerDependency when building a TS plugin in VSCode

I am currently building a plugin using TS which has some peer dependencies. I had to add install-peers-cli to make sure it installs the peers without changing package.json and the build works fine with no issues. Now the issue is that inside of…
2
votes
1 answer

Why can't a peerDependency be imported or required, even when it's present in the parent module?

I'm trying to use npm peerDependencies but nothing seems to work as advertised. What am I missing? The setup is, I have two modules, mod and plugin, both of which depend on an external module from npm. mod declares a hard dependency on both plugin…
fenomas
  • 11,131
  • 2
  • 33
  • 57
2
votes
1 answer

How to fix peer dependency warnings after upgrading Angular app from version 6 to 7

I have bought an admin template (from wrappixel) that is an Angular 6 application. I need to upgrade it to Angular version 7. I did this using ng update --force --all Note, I had to use the --force option, to ensure that the update went through,…
Plastikfan
  • 3,674
  • 7
  • 39
  • 54
2
votes
1 answer

How to resolve dependency hell in NPM with peerDependencies

Setup: Given the following points my_library makes extensive runtime use of jquery. in my_library the jquery required via npm is ^3.3.1 by default (because of security fixes in it). However it is compatible also with jquery >=2.2.0 (but is not…
Kamafeather
  • 8,663
  • 14
  • 69
  • 99
1
vote
0 answers

I am unable to get a node.js typescript project to launch properly when i npm install and when i npm run dev

As the title suggests i am unable to get a typescript project to launch properly and i've tried everything ive found on here. when i use npm install i get the error message npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving:…
tiosl
  • 11
  • 3
1
vote
0 answers

How to update peerDependencies of child projects/libraries when upgrading Angular?

I just upgraded a project from Angular 12 to 13. The ng update CLI updated the versions of packages in the package.json at the root of the project. But the angular packages mentioned in peerDependencies inside package.json of individual libraries…
Abhijeet Singh
  • 994
  • 11
  • 27
1
vote
0 answers

Why am i receiving so many warnings about peer dependencies when using Yarn?

I have just started using Yarn for the first time in a bare react native project. I started adding all dependencies that I need one-by-one. When I ran this one yarn add geofirestore, it showed many warnings after adding it: Now, every time I run a…
1
vote
0 answers

unable to use my component library based on Material UI with a nextjs application (both typescript)

On one side I have a component library using react, mui and emotion as peerDep. package.json "peerDependencies": { "@emotion/react": "^11.10.5", "@emotion/styled": "^11.10.5", "@mui/icons-material": "^5.10.15", "@mui/material": "^5.10.15", …
1
vote
1 answer

Is it possible to have two differents copies of a package in node.js

I use a lib called rainbowkit, who needs a specific version of a package. I need the latest version(0.7.5) of this package because it may fix a bug I encounter. Is this even possible ? How ? What are the best practices in this case ?
Fabien
  • 97
  • 8