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: Deno install error: @eslint/css is missing a prefix #66

Open
1 task
MikeMcC399 opened this issue Feb 24, 2025 · 3 comments
Open
1 task

Bug: Deno install error: @eslint/css is missing a prefix #66

MikeMcC399 opened this issue Feb 24, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Feb 24, 2025

Environment

ESLint version: N/A
@eslint/css version: 0.4.0
Node version: v22.14.0 LTS
Deno version: 2.2.1
Operating System: Ubuntu 24.04.2 LTS

Which language are you using?

N/A

What did you do?

npm install -g deno
cd $(mktemp -d)
deno add @eslint/css

What did you expect to happen?

The README > Installation instructions should lead to a successful installation under Deno.

What actually happened?

Error message:

deno add @eslint/css
Created deno.json configuration file.
error: @eslint/css is missing a prefix. Did you mean `deno add jsr:@eslint/css`?

Link to Minimal Reproducible Example

See above

Participation

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

Additional comments

Probably the README > Installation is incorrect and the command should be:

deno add npm:@eslint/css

however this is also not successful. It results in:

$ deno add npm:@eslint/css
Add npm:@eslint/[email protected]
error: Error in @eslint/[email protected] parsing version requirement for dependency "@types/css-tree": "file:./typings/css-tree"

Caused by:
    0: Invalid version requirement
    1: Unexpected character.
         file:./typings/css-tree
         ~

Installing an earlier release is successful:

deno add npm:@eslint/[email protected]

Related

@MikeMcC399 MikeMcC399 added the bug Something isn't working label Feb 24, 2025
@nzakas
Copy link
Member

nzakas commented Feb 24, 2025

We do also publish to JSR, so not sure whether the advice should be to install from npm or JSR at this point. Probably JSR?

@MikeMcC399
Copy link
Contributor Author

MikeMcC399 commented Feb 25, 2025

@nzakas

We do also publish to JSR, so not sure whether the advice should be to install from npm or JSR at this point. Probably JSR?

Probably you are right.

I notice though that https://eslint.org/docs/latest/use/getting-started does not list instructions for installing eslint and @eslint/js with Deno. The same for https://eslint.org/docs/latest/use/command-line-interface which does not cover how to run ESLint under Deno.

I have never used Deno before, so I wouldn't be the right person to be filling in these documentation gaps.

@MikeMcC399
Copy link
Contributor Author

Logs

with Deno 2.2.2 on Ubuntu 24.04.2 LTS

  • jsr works
  • npm fails

so it looks like jsr would be the better recommendation:

jsr

$ deno add jsr:@eslint/css
Created deno.json configuration file.
Add jsr:@eslint/[email protected]

npm

$ deno add npm:@eslint/css
Created deno.json configuration file.
Add npm:@eslint/[email protected]
error: Error in @eslint/[email protected] parsing version requirement for dependency "@types/css-tree": "file:./typings/css-tree"

Caused by:
    0: Invalid version requirement
    1: Unexpected character.
         file:./typings/css-tree
         ~

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

2 participants