-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
missing peerDependencies #117
Comments
The problem with peerDependencies is that different versions of NPM handle them differently. See https://docs.npmjs.com/cli/v7/configuring-npm/package-json#peerdependencies
That means depending on the npm version used upstream, peerDependencies might be completely ignored, and therefore not part of the lock file, in which case we should ignore them too, and in other npm versions they are treated as normal dependencies and are part of the lock file, in which case we should install them. If we want to have a nice UX, we should detect automatically which npm version was used upstream. We could to that by looking at:
But some projects won't have a lock file and none of the required fields set in package.json, therefore we still need a flag, allowing the user to manually toggle peer deps on/off. |
very nice find.
it doesn't even show the dependency, however I get the exact same error. If we don't install them, we should have a way to make an override to add a dependency. something like
(or something like that, I couldn't find a way to manually add a dependency already in the dependency graph). |
We can't just try to install You can add dependency edges via the |
very nice secret api!
wondering if I can do something like
just wondering about those, no worries if they are not implemented. |
That API should be improved and documented. The wildcard idea needs to be added as well. |
I'm sorry, I just noticed that my previous comments on this issue are highly misleading. We are in fact installing exactly the dependencies from the lock file. Dependency resolution already has happened by NPM which created the lock-file, Therefore we cannot and should not do anything regarding the peerDependencies. The problems you were running into @happysalada are due to the build toolchain not being able to cope with symlinks. This requires either patching the toolchain, or using With |
here is the problem I encountered.
While trying to build this project https://github.com/happysalada/primo
the problematic package is
svelte is in the peerDependencies. It looks like at the moment those are not installed in the node_module of the related dependency.
when I check dependencies installed for that package, I only see
most probably we should add peerdependencies as well if possible.
The text was updated successfully, but these errors were encountered: