Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node & M1 Mac: dyld[]: missing symbol called

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:

  • Removed all Node files, everything, in all folders and subfolder making sure that node was completely uninstalled
  • Removed the libraries and removed the dependencies
  • Re-installed Node with brew (using arch)
  • Re-installed libraries and dependencies

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!

like image 755
t30_9 Avatar asked Jun 27 '26 08:06

t30_9


1 Answers

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

like image 152
AnandShiva Avatar answered Jun 30 '26 11:06

AnandShiva



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!