0

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!

t30_9
  • 347
  • 4
  • 17

3 Answers3

0

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

AnandShiva
  • 906
  • 11
  • 22
-1

I was able to solve this issue using these steps:

  1. Remove node_modules

    rm -rf node_modules

  2. Instead of npm use yarn -

    yarn cache clean

    yarn install

Start the app again. I was able to solve the issue using yarn instead of npm.

Gaius Mathew
  • 187
  • 1
  • 8
-2

Once again, found the solution.

The solution was:

  • Clean up again everything. This means uninstall and delete all files for: yarn, npm, nvm, and node
  • Re-install everything via homebrew
  • Delete all node_modules
  • Re-run yarn/npm install in the repo
t30_9
  • 347
  • 4
  • 17
  • 3
    facing same issue, everything was working perfect before. Tried uninstall reinstall multiple times, don't know. Stuck on this for week now. Could you help please? – Shraddha J Feb 01 '23 at 15:36
  • This doesn't tell what the direct cause is or even how to find it (get some diagnostic info from dyld?). "Reinstall everything" is a band-aid solution that may or may not work. – ivan_pozdeev Jun 02 '23 at 06:37