redwoodjs / redwood

The App Framework for Startups
https://redwoodjs.com
MIT License
17.33k stars 994 forks source link

project:sync doesn't work with commands that tries to install packages #4982

Open Tobbe opened 2 years ago

Tobbe commented 2 years ago

I think this started when we went from yarn1 to yarn3 for RW apps (yarn3 in the RW framework doesn't seem to have been a problem). Maybe related: https://github.com/redwoodjs/redwood/issues/4937

From Discord

As of today, running yarn workspace web add -D <package> while the project is rwfw synced (to a redwood build that's synced with mainline) fails with the following:

Error: While cloning <RWPROJECT>/node_modules/@redwoodjs/eslint-config/node_modules/@babel/eslint-parser ->
<RWPROJECT>/node_modules/@babel/eslint-parser ENOENT: no such file or directory, scandir '<RWPROJECT>/node_modules/@redwoodjs/eslint-config/node_modules/@babel/eslint-parser'

I can achieve this by running yarn rw setup ui chakra-ui, or by manually calling yarn workspace web add -D @chakra-ui/react. If I terminate the rwfw sync process, it works as expected.

I did a bit of digging and found this comment:

https://github.com/yarnpkg/yarn/issues/4563#issuecomment-481215345

Which made me wonder if a recent change might have put us over some sort of system limit (I'm not sure what 8k limit @AhtiAhde is referring to).

Is anyone else experiencing this? Granted, I'm on airport wifi and have been having a generally unlucky day already, so it might just be me.

https://discord.com/channels/679514959968993311/716252919875240007/959165458295164978

Tobbe commented 2 years ago

I don't have time to look at this right now. @jtoar I'll assign you for now, just because I think it might have to do with switching to yarn3

nickpdemarco commented 2 years ago

I'll also regurgitate @Tobbe's comment from Discord, since it's a useful workaround:

The workaround for now is to disable the installation step in the rw setup command you're working on. Then first manually install the needed packages and finally start syncing (yarn rwfw project:sync)