-
Notifications
You must be signed in to change notification settings - Fork 48
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] Invalid name: "@apollo/client/core" #175
Comments
It seems the Apollo people create package.json files which are not representing real packages to allow importing their client partially. See the code in https://github.com/apollographql/apollo-client/blob/b214dd1d31cdfe6b5477bb5887a7d9615a302b27/config/prepareDist.js#L64 and the comment in apollographql/apollo-client#6656 (review) Without looking at this in any detail, I have the impression that it would be cleaner if they'd split up their @apollo/client package and remove the linked code entirely. Regarding the |
That is an invalid package name for a package.json. It is a valid require, but those are distinct things, one is asking for a package from a registry (package.json) and one is asking for content installed within node_modules (require). |
@wraithgar Thx for the clarification |
Is there an existing issue for this?
Current Behavior
Hi,
I'm not sure if it is a "bug" or if I just have a wrong understanding of package names. Anyway, I ask why the package name mentioned should be invalid? It may be unusual, but I wouldn't call it invalid. If I understand the rules of https://docs.npmjs.com/cli/v9/configuring-npm/package-json#name correctly.
My reason for asking is that we want to use a tool (CycloneDX) that uses your code. However, because of the error you threw, it cannot react adequately and break.
CycloneDX/cyclonedx-webpack-plugin#745
Can you shed some light on this?
Expected Behavior
Does not throw an error on package names, which contains more than one slash.
Steps To Reproduce
Find a small example here:
https://github.com/sresch4b/cyclonedx-issue
Run
yarn install
andyarn build
Environment
The text was updated successfully, but these errors were encountered: