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

Deploy command gets an incorrect node_modules structure #6697

Closed
2239559319 opened this issue Jun 21, 2023 · 7 comments
Closed

Deploy command gets an incorrect node_modules structure #6697

2239559319 opened this issue Jun 21, 2023 · 7 comments

Comments

@2239559319
Copy link
Contributor

pnpm version:

8.6.3

Code to reproduce the issue:

The project is 2239559319/pnpm-deploy-test

run commands

pnpm i

pnpm --filter a deploy ./pruned

Expected behavior:

The react version in node_modules folder is 18.2.0 and there is no vue in the node_modules.

Actual behavior:

image

Additional information:

  • node -v prints: v18.16.0
  • Windows, macOS, or Linux?: Linux
@2239559319
Copy link
Contributor Author

@zkochan help please

@thib3113
Copy link

maybe linked, maybe not . But, from version 8 I got an error when running deploy command .

In my side, it end with error ENOENT  ENOENT: no such file or directory, unlink 'XXXXX\pruned\node_modules\moleculer' ( but the folder exist ) .

with windows 11 / node v20.3.1

( only the same command, and I can't isolate the error at the moment ... so maybe not linked at all )

@2239559319
Copy link
Contributor Author

maybe linked, maybe not . But, from version 8 I got an error when running deploy command .

In my side, it end with error ENOENT  ENOENT: no such file or directory, unlink 'XXXXX\pruned\node_modules\moleculer' ( but the folder exist ) .

with windows 11 / node v20.3.1

( only the same command, and I can't isolate the error at the moment ... so maybe not linked at all )

The question seems to behave differently on different os. But none of them met expectations.

@YegorMedvedev
Copy link

I tried different PNPM versions and all of them failed with the same error (8.6.6, 8.4.0, 8.3.0, 8.1.1, 8.0.0).

ENOENT: no such file or directory, unlink '/pruned/node_modules/uuid'

I use MacOS 13.1, Node JS v18.16.0

@await-ovo
Copy link
Member

It seems related to #6300.

In the case dedupe-peer-dependents is true, the webpack dependency of the root directory should also appear in ./dist/node_modules at the end, but it is actually installed in this directory: pnpm-deploy-test/../../dist. This looks a bit weird, maybe this needs to be fixed ~

@thib3113
Copy link

@await-ovo I confirm ...

adding

dedupe-peer-dependents=false

in my npmrc resolve my problem .

@zkochan
Copy link
Member

zkochan commented Jul 30, 2023

🚢 8.6.11

@zkochan zkochan closed this as completed Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants