T
Twenty3mo ago
MS_07

Yarn failing on macOS and Storybook command not working locally

Yarn version: 4.4.0 Repo is already sync with latest update on main branch in github
No description
No description
37 Replies
charles
charles3mo ago
Hi @MS_07, what OS are you on? (what version + what arch)
MS_07
MS_07OP3mo ago
macOS Sequoia 15.3
Prastoin
Prastoin3mo ago
Have you by any chance removed the lockfile or re-generated it ? If yes please reset it to main Have you tried recloning the repo from scratch ? Have you tried removing node_modules folder too ?
MS_07
MS_07OP3mo ago
No why remove? The docs has process to setup and reset I follow that. For one time u can do that process of removing node modules and reinstalling but if this require everytime then this a bad behavior for any repo to setup locally.
Prastoin
Prastoin3mo ago
I don't understand, that's not the matter node_modules are not versioned within the repo You're encountering dependencies issue, have you tried cleaning your workspace back to its original state Also what is your node version ?
MS_07
MS_07OP3mo ago
23.6.1 How this is done? By resetting database?
Prastoin
Prastoin3mo ago
In my opinion it has maybe nothing to deal with twenty Your dev env dependencies seems to be corrupted for some reason To address the exact issue, could you please: - Try resetting your whole dev env dependencies by remove node_modules then yarn ( double check you have not updated the yarn.lock lockfile ) - If still not working try re-cloning a repo - Finally switch to node 18.17.0 using volta or nvm So this way we can get a better vision of the issue
MS_07
MS_07OP3mo ago
Deleted nodemodules and yarn lock file and ran yarn
No description
MS_07
MS_07OP3mo ago
I have never touched yarn lock file before too that I am sure.
Prastoin
Prastoin3mo ago
I've been able to reproduce your issue This is due to node version We've planned on migrating to node 20 in the next weeks Please install nvm And run
nvm install 18.17.0
nvm use 18.17.0
nvm install 18.17.0
nvm use 18.17.0
Or even volta which can switch automatically between node version depending on your current working directory
Prastoin
Prastoin3mo ago
MS_07
MS_07OP3mo ago
Yeah did via nvm let me see if it works or not
MS_07
MS_07OP3mo ago
No description
Prastoin
Prastoin3mo ago
try running npx nx run twenty-front:storybook:serve:dev
MS_07
MS_07OP3mo ago
Will this fix storybook issue too ?
Prastoin
Prastoin3mo ago
Yep
MS_07
MS_07OP3mo ago
No description
MS_07
MS_07OP3mo ago
Storybook not fixed. Is it running at your side?
Prastoin
Prastoin3mo ago
Yes, please find related video Please double check your node version between attempts
MS_07
MS_07OP3mo ago
Yeah I switched it but globally node didn't switched the version now I switched again and it is running Thank you so much @Prastoin
Prastoin
Prastoin3mo ago
Sounds great ! Your welcome, enjoy coding !
MS_07
MS_07OP3mo ago
Now something is breaking the main app to run locally
No description
MS_07
MS_07OP3mo ago
No description
MS_07
MS_07OP3mo ago
command is npx nx start
Prastoin
Prastoin3mo ago
Please share more information on how to reproduce this
MS_07
MS_07OP3mo ago
same node js version 18.17.0
Prastoin
Prastoin3mo ago
Seems related to translations Please run: npx nx database:reset twenty-server
MS_07
MS_07OP3mo ago
reactdatepicker and translations both throwing error
Prastoin
Prastoin3mo ago
Are you on main branch ?
MS_07
MS_07OP3mo ago
Yeah main branch is synced
MS_07
MS_07OP3mo ago
No description
Prastoin
Prastoin3mo ago
please run in sequence: npx nx build twenty-shared npx nx build twenty-emails Also reset your nx cache npx nx reset I have no issue running npx nx start from scratch based main
MS_07
MS_07OP3mo ago
No description
MS_07
MS_07OP3mo ago
No description
Prastoin
Prastoin3mo ago
Try running npx nx run twenty-emails:lingui:extract npx nx run twenty-emails:lingui:compile I feel like we should create a new thread scoped to your new error
MS_07
MS_07OP3mo ago
I cloned fresh and again setup instead of running individual commands and going down in that rabbit hole Now everything up
Prastoin
Prastoin3mo ago
Well done, best thing to do here Have a nice weekend

Did you find this page helpful?