wclr / yalc

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

Yalc seems to be using some kind of cache... #200

Open lagartoxa opened 2 years ago

lagartoxa commented 2 years ago

Hi everyone,

Maybe this is not an issue, maybe I'm not using yalc the right way but I haven't found any solution in the documentation.

I have a private library on Bitbucket called plxbasereact that I use in another project. To avoid having to commit and push to test every change I make, I'm trying to use yalc.

First I go to the project's directory and run yalc publish --private

Then I go to my main project and run yalc add plxbasereact

At this step, everything works, whatever I have locally gets imported into my main project. The problem comes now:

When I make changes in my private react library ( for this test, I just added a console.log("HERE"); ), I run yarn build and then yalc push --private (I also tried with the --scripts flag) but my main project doesn't get the changes, even if I restart my main project or try it in another browser. I also tried to run yalc update and yarn install again on my main project, but no success.

I tried to check the dist directory at three places:

The files inside those three directories have the changes I made, but my application still doesn't show the console.log that I added. It only works if I delete the lock files, the node_modules directory in my main application, do a new yarn install and repeat the same steps.

It seems the same problem this user is having https://stackoverflow.com/questions/69575534/how-to-make-code-changes-show-when-using-yalc but none of the solutions work.

I'm running yalc on a Ubuntu ARM virtual machine on my MAC. If you need more information, please ask.

Best Regards

mrlasers commented 1 year ago

Are you using Yarn plug'n'play on your main project? If you are, try running yarn after yalc update [package].

rosingrind commented 1 year ago

In case someone still search: use --sig. #202 could bring this info out