i really need your help.
I am having problems with node (v16.8.0) and my macOS with arm processor. Every time i want to run the backend of this project i get this:
dyld[17378]: missing symbol called
I have already followed the whole discussion on this other post.
I tried to do a clean install of node for arm with rosetta2, but if I run node -p "process.arch" I always get x64.
I've also tried with a more aggressive approach:
Since I have already removed and reinstalled node 5 times just today, could you please help me to find out how can I solve this problem? Thank you!
This code snippet from @adrienjoly solved the issue.
1. Start a new shell using Rosetta2. Rosetta 2 translates apps built for Intel so they will run on Apple Silicon
$ arch -x86_64 zsh
2. In that shell, reinstall the x64 version of Node.js
$ nvm use system
$ nvm cache clear
$ nvm uninstall 16 # or the version you need
$ nvm install 16 # or the version you need
$ nvm use 16 # or the version you need
3. Still in that shell, reinstall and build npm dependencies from scratch
$ rm -rf node_modules
$ yarn cache clean
$ yarn install
Whenever you come back to your project (e.g. after restarting), don't forget to select that same version of Node.js!
$ nvm use 16 # or the one you installed in step 2
The gist is we need to uninstall and install node in x64 architecture.
We clear out the cache and other dependencies so that they are also versions which are compatible with x64 build of Node.js
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With