Questions tagged [peer-dependencies]
99 questions
1
vote
1 answer
Reduce size of Angular Element output with peerDependencies
We are trying to build an Angular Element (with Angular 7) that should be used in an AngularJS project. The output .js file is 5 MB large ... to much.
An analysis with webpack-bundle-analyzer shows that most space is used by dependencies that are…

user1916076
- 145
- 1
- 16
1
vote
1 answer
How do I develop a plugin for a library when including it as a peerDependency gives me no concrete implementation to use?
The Requirements:
I am developing a plugin for popularLibrary.js. The plugin:
Will not work, at all, if popularLibrary.js is not present
Works with v1.x.x of popularLibrary.js
Must work if it's included as a dependency in a project that uses…

Daniel Brown
- 2,942
- 5
- 29
- 41
0
votes
0 answers
Why doesn't NPM allow to have different versions of the same package?
When you install a package A that requires a dependency C of version 1.0.0 and then install package B that requires a dependency C of version 2.0.0
NPM v(3-6): replaces installed package C from version 1.0.0 to 2.0.0 and just shows a warning that a…
0
votes
0 answers
Prevent library from publishing if peerDependencies are missing
I've created this NX workspace with some libraries which are published to NPM and github.
The following state of the repository causes the following error on installation
npm i @mintplayer/ng-json-ld
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable…

Pieterjan
- 2,738
- 4
- 28
- 55
0
votes
1 answer
angular2-notification dependency on zone.js after angular update
I upgraded my angular application to v16 and I'm getting below error after running npm install.
npm ERR! While resolving: angular2-notifications@12.0.0
npm ERR! Found: zone.js@0.13.1
npm ERR! node_modules/zone.js
npm ERR! zone.js@"~0.13.0" from…

jay parekh
- 9
- 1
- 5
0
votes
0 answers
How do I deal with removing peer dependencies if I continously get code ERESOLVE ERESOLVE could not resolve
I have been trying to fix my dependency issues, which looks like this currently using npm audit
nth-check <2.0.1
Severity: high
Inefficient Regular Expression Complexity in nth-check - https://github.com/advisories/GHSA-rp65-9cf3-cjxr
fix available…

Kevin W
- 19
- 3
0
votes
0 answers
why eslint sharable config has custom parser as dependency instead of peerDependency?
why eslint sharable config has custom parser as dependency instead of peerDependency?
official docs says
If your shareable config depends on a plugin, you should also specify it as a peerDependency (plugins will be loaded relative to the end user’s…

KOO
- 61
- 6
0
votes
1 answer
nx with vite builds a lib with peer dependencies (react, react-dom)
I've a standard installation: nx with vite as bundler. I have a main app and a library. Both uses react. Also a library can be used independenly. I'm trying to build library with a command:
nx build --production
but I see that react…

alexahdp
- 11
- 3
0
votes
0 answers
Angular 14 library project installs wrong dependency version, results in conflict when building consumer project
I am in the process of migrating some components which are being used in several other projects into their own component-library to avoid code duplication, among all the other advantages. It seems though I am having trouble understanding the concept…

Vortilion
- 406
- 2
- 6
- 24
0
votes
1 answer
Error While resolving... Could not resolve dependency in Angular Library
So I am writing my first ever component library. So far everything is going great but I am now testing my library by installing it into new projects.
My package.json file for my library project has the following set up (I have reduced/removed a lot…

NewToAngular
- 975
- 2
- 13
- 23
0
votes
1 answer
I have a peer dependency issues I cannot fix
I am trying to rebuild an app where it use an expo sdk version 45. Since it is deprecated I tried upgrading the sdk When i run npx expo-doctor I got the output
✔ Validating global prerequisites versions passed
✔ Checking for incompatible packages…

John Pachuau
- 73
- 1
- 1
- 6
0
votes
0 answers
Module not found error with monorepo peer deps
We are building a monorepo project with TurboRepo and yarn 3 workspaces. In our monorepo we have two packages website and core.website is a nextjs application and core is a reusable component library bundled with rollup. We have the following…

alexortizl
- 2,125
- 1
- 12
- 27
0
votes
1 answer
deleted node modules still getting conflicting peer dependency
I'm trying to build a gatsby project. My project didn't had any package conflict until I installed google analytics plugin.
I am getting dependency error even after deleting node_modules, package-lock.json, .cache.
The…

NobinPegasus
- 545
- 2
- 16
0
votes
0 answers
pnpm installation of peerDependencies did not select the correct version
pnpm version: 7.32.0
This is a reproducible demo: demo
description:
In the demo project, for some reasons, I have to use react@16.9.0, and there is also a package called @wuerkang/test_package.
@wuerkang/test_package is the test package I created,…

sombra
- 1
- 1
0
votes
1 answer
I was trying to install the dependencies but getting the following error. How to resolve it?
npm install @material-ui/core @material-ui/icons @material-ui/labs @react-google-maps/api axios google-map-react
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @testing-library/react@13.4.0
npm ERR!…

Sensa Bruno
- 1
- 1