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

Symlinked node_modules breaks build on version>1.1.7 #175

Open
SpencerBriereWEQ opened this issue Aug 20, 2019 · 4 comments
Open

Symlinked node_modules breaks build on version>1.1.7 #175

SpencerBriereWEQ opened this issue Aug 20, 2019 · 4 comments

Comments

@SpencerBriereWEQ
Copy link

SpencerBriereWEQ commented Aug 20, 2019

In version>1.1.7, the behavior of how this plugin handles node_modules seems to have changed.

In our project, we have multiple sub-projects which all share the same dependencies. Rather than having dozens of duplicate node_modules, we opted to symlink a top-level node_modules folder into the sub-projects. Now, rather than symlinking to our symlink, the symlink is copied. This results in a broken symlink as the path doesn't evaluate to the node_modules folder.

Directory structure:

  • package.json
  • node_modules
  • projects/
    • a/
      • node_modules -> ../../node_modules
      • package.json -> ../../package.json
      • .build/
        • node_modules -> ../node_modules // Expected Behavior
    • b/
      • node_modules -> ../../node_modules
      • package.json -> ../../package.json
      • .build/
        • node_modules -> ../../node_modules // Current Behavior - broken symlink

Symlink path: ../../node_modules
Expected Behavior: node_modules -> ../node_modules
Current Behavior: node_modules -> ../../node_modules

@cookejames
Copy link

I can confirm this issue. Downgrading to 1.1.6 allows packaging to work. This is a bit of a problem with monorepos where symlinking is common.

@KingDarBoja
Copy link

Maybe related to #170 as the symlink is kinda broken for higher versions than 1.1.7.

@scrofungulus
Copy link

This is still an issue today.

@antoinegomez
Copy link

In another tone since 1.1.7 my project goes from less than a minute to package to 6 minutes.

And the culprit is the copy dev dependencies function.

I have tried the esbuild plugin with success but it does not support decorators. So trying to figure out the best approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants