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

Package with dash in its name fails to install with Yarn and NPM #1429

Closed
raido opened this issue Aug 5, 2019 · 20 comments · Fixed by #1636
Closed

Package with dash in its name fails to install with Yarn and NPM #1429

raido opened this issue Aug 5, 2019 · 20 comments · Fixed by #1636

Comments

@raido
Copy link

raido commented Aug 5, 2019

Describe the bug

This package: https://yarnpkg.com/en/package/@ember-data/-build-infra is sub dependency of ember-data package. When trying to install ember-data@3.11 or @ember-data/-build-infra package directly served by Verdaccio, Verdaccio will return 404 error.

To Reproduce

Make sure package is not already on local cache.

yarn add @ember-data/-build-infra or npm install @ember-data/-build-infra

Expected behavior

Package to be successfully installed.

Environment information

Verdaccio 4.2.0
Yarn v1.17.3
NPM v6.4.1

Screenshots

Seems like there is no tarball stored on disk at all.

Screenshot 2019-08-05 at 17 12 37

@raido
Copy link
Author

raido commented Aug 5, 2019

Related: #1400

@bertdeblock
Copy link

Running into the same issue as well.

@juanpicado
Copy link
Member

Did not we ported the patch to the last release 3.x already ?

@raido
Copy link
Author

raido commented Aug 5, 2019

For the allowed names yes. How ever missing tarball issue is a new bug. It’s not returning 404 because of package name being invalid but rather actually failing to match/store/provide tarball itself.

@raido
Copy link
Author

raido commented Aug 5, 2019

Current issue is for v4.2.0 as stated above.

@juanpicado
Copy link
Member

juanpicado commented Aug 5, 2019

Ahhh ! sorry, I did not see it ... thanks :)

@raido
Copy link
Author

raido commented Aug 22, 2019

Any updates on this?

@nickschot
Copy link

nickschot commented Sep 24, 2019

Seeing the same thing (specifically w/ ember-data)

@eduardoweiland
Copy link

Seems to be caused by these lines in validateName and validatePackage.

@schleumer
Copy link

I do have the same issue with 4.3.4, in my case is with package regenerator-runtime.

@raido
Copy link
Author

raido commented Oct 26, 2019

As workaround I scope only internal package to point to Verdaccio in .npmrc and the rest is installed from public NPM registry.

@schleumer
Copy link

@raido, done that! Worked like a charm and maybe saved some server bandwidth hehe, i've reported just to bump the issue.

@kkincade
Copy link

I'm also seeing this issue specific to ember-data. This is a pretty significant issue for my company, and as a result we will need to find an alternative to Verdaccio if it is not fixed soon.

error Couldn't find package "@ember-data/-build-infra@3.14.0" required by "ember-data@~3.14.0" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: Couldn't find package "@ember-data/-build-infra@3.14.0" required by "@ember-data/serializer@3.14.0" on the "npm" registry.

@bertdeblock
Copy link

@kkincade Have you tried raido's suggestion => #1429 (comment)?

@kkincade
Copy link

@bertdeblock I had to figure out how to do this workaround in Yarn. It does indeed seem to work after clearing out any previous registry settings that I had manually configured.

Here is what I used for my .yarnrc file for those interested.

"@my-company:registry" "http://verdaccio.our.internal.domain.com"

@raido
Copy link
Author

raido commented Dec 17, 2019

Here is an example how to set it up with .npmrc

https://docs.npmjs.com/files/npmrc.html#comments

@DanielRuf
Copy link
Contributor

Current state in 4.4.0 / master:

error An unexpected error occurred: "http://localhost:4873/@ember-data%2f-build-infra/-/-build-infra-3.14.1.tgz: Request failed "404 Not Found"

@DanielRuf
Copy link
Contributor

DanielRuf commented Dec 28, 2019

The mentioned lines seem to be a working solution but then a test fails:

Summary of all failing tests
FAIL test/unit/modules/api/api.spec.ts (14.58s)
● endpoint unit test › Registry API Endpoints › should test ping api › should test endpoint /-/ping

This returns "no such package available" in the UI.

@juanpicado
Copy link
Member

Shipped on v4.4.1 powered by @DanielRuf

@lock
Copy link

lock bot commented Apr 4, 2020

🤖This thread has been automatically locked 🔒 since there has not been any recent activity after it was closed.
We lock tickets after 90 days with the idea to encourage you to open a ticket with new fresh data and to provide you better feedback 🤝and better visibility 👀.
If you consider, you can attach this ticket 📨 to the new one as a reference for better context.
Thanks for being a part of the Verdaccio community! 💘

@lock lock bot added the outdated label Apr 4, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants