-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] npm outdated fails to parse aliases #2800
Comments
I am also getting this issue. For me the issue was caused by this dependency:
It needs to be installed with an alias to take advantage of the paid features of the This is in a public repo of mine. Additional InfoWindows 10
2021-03-03T10_34_30_128Z-debug.log:
|
- Several major dependency updates (see changes in `package.json`) - `shockingly` version of `gsap` was causing issues, as it uses an alias, which causes issues when using `npm update`. The `shockingly` version wasn't needed anyways. See this issue: npm/cli#2800 - Ran codemod: `npx gatsby-codemods gatsby-plugin-image` (see: https://www.npmjs.com/package/gatsby-plugin-image#migrating ) - Uninstalled `prettier` as it was not used TODO: - Fix the depreciation warning caused by `gatsby-transformer-sharp` - Have a look over the image queries to see if they can be improved.
This also crops up with Tailwind's instructions for using it with Create-React-App, which are based on an alias as well: https://tailwindcss.com/docs/guides/create-react-app
|
This happens to me as well. I had to change from using the official I have temporarily switched to another version in an open PR by changing to this line: This makes Error while gathering outdated dependencies:
stack Error: Command failed: npm outdated --json --long --save false
stack npm ERR! Only tag, version, and range are supported
stack {
stack "error": {
stack "code": null,
stack "summary": "Only tag, version, and range are supported",
stack "detail": ""
stack }
stack }
stack
stack npm ERR! A complete log of this run can be found in:
stack npm ERR! /Users/andreasolsson/.npm/_logs/2021-03-25T08_18_12_288Z-debug.log
stack
stack at ChildProcess.exithandler (node:child_process:333:12)
stack at ChildProcess.emit (node:events:376:20)
stack at maybeClose (node:internal/child_process:1063:16)
stack at Process.ChildProcess._handle.onexit (node:internal/child_process:295:5)
message Command failed: npm outdated --json --long --save false
message npm ERR! Only tag, version, and range are supported
message {
message "error": {
message "code": null,
message "summary": "Only tag, version, and range are supported",
message "detail": ""
message }
message }
message
message npm ERR! A complete log of this run can be found in:
message npm ERR! /Users/andreasolsson/.npm/_logs/2021-03-25T08_18_12_288Z-debug.log
message
killed false
code 1
signal null
cmd npm outdated --json --long --save false This is a pretty bad issue, since we run |
I was having this issue with my Gatsby build. I found this issue, specifically this comment which helped me solve. Initially when I had updated TailwindCSS to v.2 I had a pesky error, and the work around was to install a PostCSS7 compatibility build (see this doc). I ran
which then allowed me to run The above removed the following code from my |
Any updates/estimation for this issue? |
Run `npm install` with NPM 7 to update `package-lock.json` format to v2. NPM v7 has a bug with aliased packages when running `npm outdated`. To avoid this, install `kolmafia-types` without aliasing, and update TypeScript's config to resolve `kolmafia` to `kolmafia-types`. Also, update `kolmafia-types` to 0.1.1. - Description of the NPM v7 bug: npm/cli#2800 - Description of the workaround: https://github.com/pastelmind/kolmafia-types/tree/v0.1.1#method-2-use-a-custom-path-to-resolve-kolmafia
Run `npm install` with NPM 7 to update `package-lock.json` format to v2. NPM v7 has a bug with aliased packages when running `npm outdated`. To avoid this, install `kolmafia-types` without aliasing, and update TypeScript's config to resolve `kolmafia` to `kolmafia-types`. Also, update `kolmafia-types` to 0.1.1. - Description of the NPM v7 bug: npm/cli#2800 - Description of the workaround: https://github.com/pastelmind/kolmafia-types/tree/v0.1.1#method-2-use-a-custom-path-to-resolve-kolmafia
Due to a bug in NPM v7, `npm outdated` fails when kolmafia-types is aliased. To work around this, we install `kolmafia-types` by its name, and TypeScript's `compilerOptions.paths` field is used to resolve `kolmafia` to `kolmafia-types`. We also install: - kolmafia-types 0.1.1 (updated) - tsconfig-paths which is needed to run tests with Jasmine + ts-node See also: - GitHub issue for the NPM v7 bug: npm/cli#2800 - Description of the workaround: https://github.com/pastelmind/kolmafia-types/tree/v0.1.1#method-2-use-a-custom-path-to-resolve-kolmafia
NPM v7 currently has a bug that causes `npm outdated` to fail when `package.json` contains an aliased dependency. To work around this, we use the `compilerOptions.paths` field in `tsconfig.json` to resolve `kolmafia` to `kolmafia-types`. See related bug report: npm/cli#2800
This is a pretty big bug, surprised it takes so long for it to be fixed |
Just ran into the same issue trying to to migrate to Nuxt3, granted it came out pretty much this week. OS: macOS Big Sur 11.6 (20G165)
➜ npm outdated
npm ERR! Only tag, version, and range are supported
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/vladimir/.npm/_logs/2021-10-14T11_20_08_839Z-debug.log Log file content:
|
I've been having to work around this issue for like a year now. Looking forward to a solution. |
This issue is present in v7.x as well as v8.x. |
For my case, I had to switch back to the compat version of postcss after updating outdated packages. Eagerly waiting for a fix. |
Also experiencing this issue with docsify.js. Running Also eagerly waiting for a fix. Thx! |
also facing the same problem with |
Fixes `npm outdated` to properly parse and display info on aliased packages. Fixes: npm#2800
Fixes `npm outdated` to properly parse and display info on aliased packages. Fixes: npm#2800
@ruyadorno Does this issue also address #2884 and #4197 so that |
Current Behavior:
Running
npm outdated
on a folder that contains apackage.json
using aliases (e.g:npm install <alias>@npm:<name>
), see: https://docs.npmjs.com/cli/v7/commands/npm-installExpected Behavior:
npm outdated
should work.Steps To Reproduce:
Given a package.json using aliases:
Run outdated
The text was updated successfully, but these errors were encountered: