-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
bundledDependencies not working #844
Comments
Seems like it was simply not implemented in pnpm? |
pnpm just skips the bundled dependencies, so it does not install packages that are listed in |
From this comment...
...it looks like they will create a traditional nested node_modules structure for that dep when packing. We should do similar. |
But this would mean that Or we could include a function that should be added as a pre-publish step, to ensure bundled deps are bundled properly before publishing a package with bundledDeps. |
oh, so the problem is with a package published by pnpm. Currently pnpm does not support publishing of packages that have bundled dependencies at all (see "Limitations" section in README). Even though we don't print any warnings about it. We should. It should work though with packages that have bundled deps but are published via npm. A weird situation I guess... I think if we want bundled deps in pnpm, we should do it the pnpm way, which is, we need them in a symlinked |
In any case, as a first step, pnpm should fail if someone wants to publish a package with |
There are 2 cases:
|
Agree. But often I will use |
With normal dependencies being stored at With pack the nested node_modules might be somewhat of an issue, and may not be ideal. Perhaps you could add a Either way it would also be nice to have it work with workspaces. For example, I have a package within the workspace that represents an app. It uses several utility packages. I would like to bundle that app with the workspace dependencies for a nightly build. |
This is resolved. Packages with bundled dependencies can be installed by pnpm. If you want to publish a package with bundled deps, you need to use node-linker=hoisted |
Sorry to reawaken this issue. I have tested bundling dependencies with Is this expected behaviour? If not, here is a minimal repo that reproduces this case, consisting of a package.json with a single pnpm dependency which has .npmrc with After cloning the repo , run |
Try install
pnpm i -g dimsim-docker@0.1.2
, then rundimsim-docker
.babel-runtime
is a bundled dep but does not get its dependencies (core-js) installed correctly.I am seeing the same issue with https://github.com/mapnik/node-mapnik` which uses
node-pre-gyp
as a bundled dep.The issue doesn't show up when you run a
pnpm i
(indimsim-docker
for example) - as they are installed as normal dependencies. It only shows up when it is being globally installed, or when the package withbundledDeps
is a transitive dep.The text was updated successfully, but these errors were encountered: