wclr / yalc

Work with yarn/npm packages locally like a boss.
MIT License
5.64k stars 147 forks source link

doing "npm i" breaks yalc dependencies #182

Open YanDevDe opened 2 years ago

YanDevDe commented 2 years ago

Hello everyone,

on the project where I added a local dependencies per yalc add <package> worked wonderful.

But everytime if I have to install package per npm i <third-party-package>, for some oddly reason the dependencies of yalc is causing trouble. For as example throwing this error:

Uncaught ReferenceError: exports is not defined
    at eval (webpack-internal:///./.yalc/<package>/dist/index.js:173)
    at Module../.yalc/<package>/dist/index.js

If I do yalc add <package> again, then it works normally as expected. This error repeats when I do npm i <third-party-package> again.

I don't have this issue on other projects, but for some reason, I do have issue on this project everytime.

I'm using

node v14.19.0 npm 6.14.16 yalc 1.0.0-pre.53

What am I doing it wrong?