atomicdata-dev / atomic-data-browser

This repo is no longer used! Code is moved to Atomic-Server
https://github.com/atomicdata-dev/atomic-server/issues
MIT License
56 stars 9 forks source link

Consider `pnpm` instead of `yarn` #210

Closed joepio closed 2 years ago

joepio commented 2 years ago

I've seen some big projects switch to pnpm, like next and vite. It's faster and re-uses dependencies on your disk (although yarn has an option for that, too). Even unoptimized it's about as fast as yarn 3 + cache (which is what we use).

I also had some problems with running scripts from sub projects in workspaces (e.g. running yarn test from /react required me to duplicate the dependency. Not sure if pnpm fixes this, but it's worth trying.

joepio commented 2 years ago

Turns out my imports / dependencies were messed up, but for some reason with yarn we never noticed. Things like using @tomic/lib instead of @tomic/react, while that dependency wasn't even added to dependencies.

Anyhow, now I have some recurring issue with files not being found in the .pnpm folder:

Error: ENOENT: no such file or directory, open '/Users/joep/dev/github/atomicdata-dev/atomic-data-browser/node_modules/.pnpm/react-hot-toast@2.1.1_ef5jwxihqo6n7gxfmzogljlgcm/node_modules/react-hot-toast/dist/react-hot-toast.esm.js

The folder doesn't exist. There is a react-hot-toast folder, but it's react-hot-toast@2.1.1_xb3noawg3grui6hzaob7jwa63y

After running pnpm store prune and rm -rf node_modules the problem turned to a different node library.