Skip to content
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: updating package is broken #57

Closed
1 task
dhtzs opened this issue Feb 19, 2025 · 7 comments
Closed
1 task

Bug: updating package is broken #57

dhtzs opened this issue Feb 19, 2025 · 7 comments
Labels
bug Something isn't working

Comments

@dhtzs
Copy link

dhtzs commented Feb 19, 2025

Environment

ESLint version:
@eslint/css version: v0.3.0
Node version: v22.14.0
npm version: v11.1.0
Operating System: linux 5.15.167.4-microsoft-standard-WSL2

Which language are you using?

rule

What did you do?

$ cat package.json
{
"name": "test",
"version": "1.0.0",
"description": "",
"devDependencies": {
"@eslint/css": "^0.3.0"
}
}

$ npm install @eslint/css --save-dev

added 12 packages, and audited 14 packages in 2s

found 0 vulnerabilities

$ npm install @eslint/css --save-dev
npm error Cannot destructure property 'package' of 'node.target' as it is null.
npm error A complete log of this run can be found in: /home/dhtzs/.npm/_logs/2025-02-19T23_35_13_864Z-debug-0.log

What did you expect to happen?

Expected to install the latest version of @eslint/css.

What actually happened?

Got an error

Link to Minimal Reproducible Example

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

2025-02-19T23_36_53_562Z-debug-0.log

@dhtzs dhtzs added the bug Something isn't working label Feb 19, 2025
@MikeMcC399
Copy link
Contributor

@dhtzs

To install the latest version you would need:

npm install @eslint/css@latest --save-dev

however that fails the same way

npm error Cannot destructure property 'package' of 'node.target' as it is null.

Workaround

npm uninstall @eslint/css
npm install @eslint/css@latest --save-dev

@nzakas
Copy link
Member

nzakas commented Feb 20, 2025

This is an error with the npm cli, not with the package itself. This happens when there's a conflict between an already-installed package's dependencies and the dependencies of a package that is attempting to be installed. That's why removing and then reinstalling fixes the problem.

You can try opening a bug with npm, although they're not very responsive these days.

@nzakas nzakas closed this as not planned Won't fix, can't repro, duplicate, stale Feb 20, 2025
@dhtzs
Copy link
Author

dhtzs commented Feb 20, 2025

Hey @nzakas, I tried reproducing the same bug using an older version ([email protected]) and I'm getting the same error. Again, these are the commands to reproduce this:

$ mkdir eslint-css
$ cd eslint-css
$ npm init -y
$ npm install @eslint/css@latest --save-dev
$ npm install @eslint/css@latest --save-dev

I'm getting this error after executing the last command:

C:\Users\dhtzs\Desktop\eslint-css>npm install @eslint/css@latest
npm error Cannot destructure property 'package' of 'node.target' as it is null.
npm error A complete log of this run can be found in: C:\Users\dhtzs\AppData\Local\npm-cache\_logs\2025-02-20T23_01_16_577Z-debug-0.log

@nzakas
Copy link
Member

nzakas commented Feb 20, 2025

You should report that to npm. There's nothing special about this package.

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Feb 21, 2025

@nzakas

You should report that to npm.

There's nothing special about this package.

@MikeMcC399
Copy link
Contributor

I have submitted an issue to npm:

@dhtzs
Copy link
Author

dhtzs commented Feb 21, 2025

Thanks for creating the issue @MikeMcC399

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants