christopherthielen / check-peer-dependencies Goto Github PK
View Code? Open in Web Editor NEWChecks peer dependencies of the current NodeJS package. Offers solutions for any that are unmet.
License: MIT License
Checks peer dependencies of the current NodeJS package. Offers solutions for any that are unmet.
License: MIT License
check-peer-dependencies --yarn --install
Usage Error: Couldn't find a script named "upgrade".
I am editing this ticket because it seems that it has nothing to do with that package. Even when that package has been removed entirely, it still hangs.
npx check-peer-dependencies --yarn --install
npx: installed 44 in 3.597s
// I waited over a minute at this point before I killed the process
^C
If you can add a --debug
flag to help determine why it's hanging, I can let you know what it says.
Hi @christopherthielen just trying to update uirouter angular hybrid to latest but I'm having problems with this dependency:
$ yarn upgrade [email protected]
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Rebuilding all packages...
success Saved lockfile.
success Saved 2 new dependencies.
info Direct dependencies
└─ [email protected]
info All dependencies
├─ @jridgewell/[email protected]
└─ [email protected]
Found 1 new unmet peerDependencies...
❌ terser ^5.4.0 is required by [email protected]) OPTIONAL (1.0.0 is installed)
Not sure why it thinks 1.0.0 is installed when it's installed 5.30.0 which should be higher than 5.4.0. I'm wondering if there's something amiss with the way it's checking the dependency version?
You can see the failing build here:
Ok to proceed? (y) y
/home/nvp/.npm/_npx/25bb3e225fb6eeb9/node_modules/check-peer-dependencies/dist/packageUtils.js:51
throw new Error("WARN: Unable to resolve package " + dependency.name + " from " + packagePath);
^
Error: WARN: Unable to resolve package @ampproject/remapping from /home/nvp/Development/NullVoxPopuli/limber/apps/tutorial/node_modules/@babel/core
at walkDependency (/home/nvp/.npm/_npx/25bb3e225fb6eeb9/node_modules/check-peer-dependencies/dist/packageUtils.js:51:23)
at /home/nvp/.npm/_npx/25bb3e225fb6eeb9/node_modules/check-peer-dependencies/dist/packageUtils.js:59:74
at Array.forEach (<anonymous>)
yarn and npm are support the args --cwd
and --prefix
respectively in order to change the working directory.
The feature can be awesome
I'd like to use this within a larger set of CI checks that I currently have in a custom script.
As is I need to spawn this via exec and parse the output, would be great if I could import and call it directly without all the console.logs and get an object back
This is a docs/readme suggestion to help understand this package better when used in a project
Enhancement to the docs suggested, because it would be good to know if check-peer-dependencies
is build from the standpoint of npm < 7
or npm 7, 8+
. Since npm 7.0
had a major change in the way peer dependencies are treated (they are installed along with subdependencies, whereas in npm 6
and below, one had to add peers in their own project's dependencies).
I'm not sure whether --findSolutions
is finding solutions for the npm 6
or npm 7+
lockfile model.
When using check-peer-dependencies --install
it properly identifies and installs missing peer dependencies, however peer dependencies of dev-dependencies are not installed as dev-dependencies.
> npm install --save-dev eslint-config-airbnb
on a freshly initialized otherwise empty project complains about missing peer dependencies
> npx check-peer-dependencies --install
installs missing peer dependencies of eslint-config-airbnb
as dev-dependencies since it is itself a dev-dependency
> npx check-peer-dependencies --install
installs missing peer dependencies of eslint-config-airbnb
as non-dev dependencies
Sometimes you have to keep some dependencies unresolved because your project setup does not allow another way f.e.:
✅ karma * is required by [email protected] (5.2.3 is installed)
✅ karma >=0.9 is required by [email protected] (5.2.3 is installed)
✅ karma >=0.9 is required by [email protected] (5.2.3 is installed)
✅ karma >=0.9 is required by [email protected] (5.2.3 is installed)
❌ tslib ^1.10.0 is required by @angular/[email protected]) (2.0.3 is installed)
❌ tslib ^1.10.0 is required by @angular/[email protected]) (2.0.3 is installed)
✅ tslib ^2.0.0 is required by [email protected] (2.0.3 is installed)
✅ tslint ^6.1.0 is required by @angular-devkit/[email protected] (6.1.3 is installed)
✅ tslint ^5.0.0 || ^6.0.0 is required by [email protected] (6.1.3 is installed)
❌ tslint ^5.0.0 is required by [email protected]) (6.1.3 is installed)
❌ tslint ^5.0.0 is required by @fimbul/[email protected]) (6.1.3 is installed)
Searching for solutions for 4 missing dependencies...
❌ Unable to find a version of tslib that satisfies the following peerDependencies: ^1.10.0 and ^2.0.0
❌ Unable to find a version of tslint that satisfies the following peerDependencies: ^6.1.0 and ^5.0.0 || ^6.0.0 and ^5.0.0
I would like to whitelist some packages to use this tool to check the rest of our project.
Analyze packages inside "workspaces": [] in root package.json
After installing the latest version of the tool and while running this using a script. We are getting below error. I've gone through the code a little bit and didn't find any argument to send a dependency name to ignore.
Can someone please help with ignoring or any other fix for fsevents
or similar dependencies.
As we know that users cannot install fsevents
dep in windows servers.
throw new Error("Unable to resolve package " + dependency.name + " from " + packagePath);
^
Error: Unable to resolve package fsevents from C:\Users\v-anvodn\Desktop\MSRepos\test-applications\node_modules\react-scripts
at walkDependency (C:\Users\v-anvodn\Desktop\MSRepos\test-applications\node_modules\check-peer-dependencies\dist\packageUtils.js:57:11)
at Array.forEach (<anonymous>)
at walkPackageDependencyTree (C:\Users\v-anvodn\Desktop\MSRepos\test-applications\node_modules\check-peer-dependencies\dist\packageUtils.js:63:38)
at walkDependency (C:\Users\v-anvodn\Desktop\MSRepos\test-applications\node_modules\check-peer-dependencies\dist\packageUtils.js:60:4)
at Array.forEach (<anonymous>)
at walkPackageDependencyTree (C:\Users\v-anvodn\Desktop\MSRepos\test-applications\node_modules\check-peer-dependencies\dist\packageUtils.js:63:38)
at Object.gatherPeerDependencies (C:\Users\v-anvodn\Desktop\MSRepos\test-applications\node_modules\check-peer-dependencies\dist\packageUtils.js:23:5)
at getAllNestedPeerDependencies (C:\Users\v-anvodn\Desktop\MSRepos\test-applications\node_modules\check-peer-dependencies\dist\checkPeerDependencies.js:21:47)
at Object.checkPeerDependencies (C:\Users\v-anvodn\Desktop\MSRepos\test-applications\node_modules\check-peer-dependencies\dist\checkPeerDependencies.js:64:37)
at Object.<anonymous> (C:\Users\v-anvodn\Desktop\MSRepos\test-applications\node_modules\check-peer-dependencies\dist\cli.js:51:25)
Let me know if you have any questions,
Raag!
Within our group, we have a lot of peer dependency issues that we need to resolve, but we want to leverage this tool to block CI jobs that have invalid peer dependency combos. Thus, we would like to filter dependencies that we know are invalid and plan to work on them to "stop the bleeding". Could we add a flag for --ignore
?
npx check-peer-dependencies --ignore react,eslint
The above would still return 0
if the only peer dep violations were related to react
and eslint
At the moment check-peer-dependencies
doesn't seem to take the overrides
into account.
For example, with this as result
I'd expect this override to also get rid of the peer dependency warning
Please correct me if I'm wrong, if not I hope this gets considered.
Thanks in advance and thanks for the great script!
Currently includePrerelease
always is true
,
But sometimes we need stable version, like vite
,
Hope can add includePrerelease
to toggle default actions.
Wanted to put in a request to upgrade the 'semver' package to version 7.5.4 or later. This update would eliminate the identified security risk and additionally facilitate smoother progression through code reports. Thanks!
Here are the relevant links:
I have got the following error:
16:28:32 #12 108.7 ❌ Unable to find a version of ajv that satisfies the following peerDependencies: ^8.0.0 and ^8.8.2 and ^6.9.1
16:28:32 #12 108.7 ❌ Unable to find a version of mongoose that satisfies the following peerDependencies: ~6.10.0 and ~6.11.0 and *
It seems that ajv
and mongoose
is already installed, any chance that you can add a new flag that will choose the lowest version of the problematic npm package?
Full output:
16:27:45 #12 61.69 npm WARN exec The following package was not found and will be installed: [email protected]
16:27:48 #12 64.29 ❌ @compodoc/compodoc ^1.1.15 is required by @twittwer/[email protected] (@compodoc/compodoc is not installed)
16:27:48 #12 64.29 ❌ ajv ^8.8.2 is required by [email protected]) (6.12.6 is installed)
16:27:48 #12 64.29 ✅ ajv ^6.9.1 is required by [email protected] (6.12.6 is installed)
16:27:48 #12 64.29 ❌ mongodb-memory-server 8.10.2 is required by @myrepo-core/[email protected] (mongodb-memory-server is not installed)
16:27:48 #12 64.29 ✅ mongoose ~6.10.0 is required by @typegoose/[email protected] (6.10.5 is installed)
16:27:48 #12 64.29 ❌ mongoose ~6.11.0 is required by @typegoose/[email protected]) (6.10.5 is installed)
16:27:48 #12 64.29 ❌ mongoose ~6.11.0 is required by @typegoose/[email protected]) (6.10.5 is installed)
16:27:48 #12 64.29 ✅ mongoose * is required by @nestjs/[email protected] (6.10.5 is installed)
16:27:48 #12 64.29 ❌ passport ^0.4.0 || ^0.5.0 || ^0.6.0 is required by @nestjs/[email protected] (passport is not installed)
16:27:48 #12 64.29
16:27:48 #12 64.29 Searching for solutions for 6 missing dependencies...
16:27:48 #12 64.29
16:27:51 #12 67.94 ❌ Unable to find a version of ajv that satisfies the following peerDependencies: ^8.0.0 and ^8.8.2 and ^6.9.1
16:27:51 #12 67.94 ❌ Unable to find a version of mongoose that satisfies the following peerDependencies: ~6.10.0 and ~6.11.0 and *
16:27:51 #12 67.94
16:27:51 #12 67.94 Installing peerDependencies...
16:27:51 #12 67.94
16:27:51 #12 67.94 $ yarn add [email protected] [email protected]
16:27:51 #12 68.20 yarn add v1.22.19
16:27:52 #12 68.33 [1/4] Resolving packages...
16:27:53 #12 69.89 [2/4] Fetching packages...
16:27:54 #12 70.94 [3/4] Linking dependencies...
16:27:54 #12 70.95 warning " > @anatine/[email protected]" has unmet peer dependency "openapi3-ts@^2.0.0 || ^3.0.0".
16:27:54 #12 70.95 warning " > @anatine/[email protected]" has unmet peer dependency "[email protected]".
16:27:54 #12 70.95 warning "@anatine/zod-nestjs > @anatine/[email protected]" has unmet peer dependency "openapi3-ts@^2.0.0 || ^3.0.0".
16:27:54 #12 70.95 warning " > @myrepo-core/[email protected]" has unmet peer dependency "is-class@^0.0.9".
16:27:54 #12 70.95 warning "@myrepo-core/elastic-apm-provider > @typegoose/[email protected]" has unmet peer dependency "mongoose@~6.11.0".
16:27:54 #12 70.95 warning " > @nestjs/[email protected]" has unmet peer dependency "axios@^1.3.1".
16:27:54 #12 70.95 warning "@nrwl/cypress > @nrwl/[email protected]" has unmet peer dependency "nx@>= 14.1 <= 16".
16:27:54 #12 70.96 warning "@nrwl/nest > @nrwl/node > @nrwl/webpack > [email protected]" has unmet peer dependency "@babel/core@^7.12.0".
16:27:54 #12 70.96 warning " > @nx-tools/[email protected]" has unmet peer dependency "@nrwl/devkit@^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0".
16:27:54 #12 70.96 warning " > @nx-tools/[email protected]" has unmet peer dependency "dotenv@>=10.0.0".
16:27:54 #12 70.96 warning "@nx-tools/nx-container > @nx-tools/[email protected]" has unmet peer dependency "@nrwl/devkit@^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0".
16:27:54 #12 70.96 warning " > @twittwer/[email protected]" has unmet peer dependency "@compodoc/compodoc@^1.1.15".
16:28:07 #12 81.57 [4/4] Building fresh packages...
16:28:08 #12 85.06 success Saved lockfile.
16:28:08 #12 85.33 success Saved 13 new dependencies.
16:28:09 #12 85.33 info Direct dependencies
16:28:09 #12 85.33 ├─ [email protected]
16:28:09 #12 85.33 └─ [email protected]
16:28:09 #12 85.33 info All dependencies
16:28:09 #12 85.33 ├─ @types/[email protected]
16:28:09 #12 85.33 ├─ [email protected]
16:28:09 #12 85.33 ├─ [email protected]
16:28:09 #12 85.33 ├─ [email protected]
16:28:09 #12 85.33 ├─ [email protected]
16:28:09 #12 85.33 ├─ [email protected]
16:28:09 #12 85.33 ├─ [email protected]
16:28:09 #12 85.33 ├─ [email protected]
16:28:09 #12 85.33 ├─ [email protected]
16:28:09 #12 85.33 ├─ [email protected]
16:28:09 #12 85.33 ├─ [email protected]
16:28:09 #12 85.33 ├─ [email protected]
16:28:09 #12 85.33 └─ [email protected]
16:28:09 #12 85.34 Done in 17.14s.
16:28:09 #12 85.39
16:28:09 #12 85.39 $ yarn add -D @compodoc/[email protected]
16:28:09 #12 85.66 yarn add v1.22.19
16:28:09 #12 85.78 [1/4] Resolving packages...
16:28:11 #12 87.47 warning @compodoc/compodoc > pdfjs-dist > [email protected]: dommatrix is no longer maintained. Please use @thednp/dommatrix.
16:28:11 #12 87.49 warning @compodoc/compodoc > @angular-devkit/schematics > magic-string > [email protected]: Please use @jridgewell/sourcemap-codec instead
16:28:11 #12 88.04 warning @compodoc/compodoc > pdfmake > @foliojs-fork/pdfkit > @foliojs-fork/fontkit > brfs > static-module > magic-string > [email protected]: Please use @jridgewell/sourcemap-codec instead
16:28:12 #12 88.82 [2/4] Fetching packages...
16:28:12 #12 88.83 warning Pattern ["cors@latest"] is trying to unpack in the same destination "/cache/.npm_cache/v6/npm-cors-2.8.5-eac11da51592dd86b9f06f6e7ac293b3df875d29-integrity/node_modules/cors" as pattern ["[email protected]","cors@~2.8.5"]. This could result in non-deterministic behavior, skipping.
16:28:12 #12 88.83 warning Pattern ["object-assign@latest"] is trying to unpack in the same destination "/cache/.npm_cache/v6/npm-object-assign-4.1.1-2109adc7965887cfc05cbbd442cac8bfbb360863-integrity/node_modules/object-assign" as pattern ["object-assign@^4","object-assign@^4.1.1","object-assign@^4.1.1","object-assign@^4"]. This could result in non-deterministic behavior, skipping.
16:28:12 #12 88.83 warning Pattern ["send@latest"] is trying to unpack in the same destination "/cache/.npm_cache/v6/npm-send-0.18.0-670167cc654b05f5aa4a767f9113bb371bc706be-integrity/node_modules/send" as pattern ["[email protected]","[email protected]"]. This could result in non-deterministic behavior, skipping.
16:28:13 #12 89.96 [3/4] Linking dependencies...
16:28:13 #12 89.96 warning " > @anatine/[email protected]" has unmet peer dependency "openapi3-ts@^2.0.0 || ^3.0.0".
16:28:13 #12 89.96 warning " > @anatine/[email protected]" has unmet peer dependency "[email protected]".
16:28:13 #12 89.96 warning "@anatine/zod-nestjs > @anatine/[email protected]" has unmet peer dependency "openapi3-ts@^2.0.0 || ^3.0.0".
16:28:13 #12 89.96 warning " > @myrepo-core/[email protected]" has unmet peer dependency "is-class@^0.0.9".
16:28:13 #12 89.96 warning " > @nestjs/[email protected]" has unmet peer dependency "axios@^1.3.1".
16:28:13 #12 89.97 warning "@nrwl/cypress > @nrwl/[email protected]" has unmet peer dependency "nx@>= 14.1 <= 16".
16:28:13 #12 89.97 warning "@nrwl/nest > @nrwl/node > @nrwl/webpack > [email protected]" has unmet peer dependency "@babel/core@^7.12.0".
16:28:13 #12 89.98 warning " > @nx-tools/[email protected]" has unmet peer dependency "@nrwl/devkit@^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0".
16:28:13 #12 89.98 warning " > @nx-tools/[email protected]" has unmet peer dependency "dotenv@>=10.0.0".
16:28:13 #12 89.98 warning "@nx-tools/nx-container > @nx-tools/[email protected]" has unmet peer dependency "@nrwl/devkit@^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0".
16:28:28 #12 104.3 [4/4] Building fresh packages...
16:28:28 #12 104.6 success Saved lockfile.
16:28:28 #12 104.9 success Saved 89 new dependencies.
16:28:28 #12 104.9 info Direct dependencies
16:28:28 #12 104.9 └─ @compodoc/[email protected]
16:28:28 #12 104.9 info All dependencies
16:28:28 #12 104.9 ├─ @aduh95/[email protected]
16:28:28 #12 104.9 ├─ @compodoc/[email protected]
16:28:28 #12 104.9 ├─ @compodoc/[email protected]
16:28:28 #12 104.9 ├─ @compodoc/[email protected]
16:28:28 #12 104.9 ├─ @compodoc/[email protected]
16:28:28 #12 104.9 ├─ @foliojs-fork/[email protected]
16:28:28 #12 104.9 ├─ @foliojs-fork/[email protected]
16:28:28 #12 104.9 ├─ @foliojs-fork/[email protected]
16:28:28 #12 104.9 ├─ @ts-morph/[email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 ├─ [email protected]
16:28:28 #12 104.9 └─ [email protected]
16:28:28 #12 104.9 Done in 19.25s.
16:28:28 #12 104.9
16:28:30 #12 106.1 Found 1 new unmet peerDependencies...
16:28:30 #12 107.3 ❌ ajv ^8.8.2 is required by [email protected]) (6.12.6 is installed)
16:28:30 #12 107.3 ✅ ajv ^6.9.1 is required by [email protected] (6.12.6 is installed)
16:28:30 #12 107.3 ✅ mongoose ~6.10.0 is required by @typegoose/[email protected] (6.10.5 is installed)
16:28:30 #12 107.3 ❌ mongoose ~6.11.0 is required by @typegoose/[email protected]) (6.10.5 is installed)
16:28:30 #12 107.3 ❌ mongoose ~6.11.0 is required by @typegoose/[email protected]) (6.10.5 is installed)
16:28:30 #12 107.3 ✅ mongoose * is required by @nestjs/[email protected] (6.10.5 is installed)
16:28:30 #12 107.3
16:28:30 #12 107.3 Searching for solutions for 3 missing dependencies...
16:28:30 #12 107.3
16:28:32 #12 108.7 ❌ Unable to find a version of ajv that satisfies the following peerDependencies: ^8.0.0 and ^8.8.2 and ^6.9.1
16:28:32 #12 108.7 ❌ Unable to find a version of mongoose that satisfies the following peerDependencies: ~6.10.0 and ~6.11.0 and *
16:28:32 #12 108.
Hi there, thanks for writing this lib! One thing that would be really helpful is to automate this check on CI, to prevent merges with peer dependencies not met.
There are ways obviously to store the output of this lib and parse the file, but it would be awesome to:
Thanks!
This is a very helpful tool, thanks!
A nice enhancement would be to provide a new command line argument for printing the whole list of peer dependencies. Since the tool already gathers the list of peer dependencies, I hope the implementation is easy. But it will help when checking an app's package.json
for obsolete packages. Output could be human-readable and/or JSON (for using with scripts).
Hey
As far as I understand, --ignore
allows to bypass check for some specific packages. I need the opposite - I'd like to check peerDependencies only for limited set of packages (ideally - by regexpt/scope), and I do not care about babel plugins and similar things
Are you open for such PR?
Hi,
my project depends on a library that uses i18n-http-backend
as peerDependency
.
Given i18n-http-backend
is not installed locally, npx check-peer-dependencies
correctly warns about this issue:
❌ i18next-http-backend ^1.2.2 is required by @spartacus/[email protected] (i18next-http-backend is not installed)
.
However, installing "i18next-http-backend" does not make the error disappear.
The error can be reproduced as follows:
mkdir test
cd test
yarn init
yarn add @spartacus/[email protected]
npx check-peer-dependencies --install --yarn // quits with Recursion limit reached (5)
npx check-peer-dependencies --yarn // this prints the error, but it shouldn't
My guess is that this is due to the folder structure of i18n-http-backend
.
resolve.sync
reads the following path'node_modules/i18next-http-backend/cjs/package.json'
but this file does not contain a version number, therefore getInstalledVersion
returns undefined
. Which leads to the result that it is assumed that the library is not installed, even if it is present in node_modules
.
I am not sure if this is a bug in the i18n library, or if check-peer-dependencies
needs to be more flexible here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.