Skip to content

Electron start command gives error: Library not loaded on M1 Macbook #204

@Alnyli07

Description

@Alnyli07

Bug Description:

I could not start electron app properly. Gives library not loaded error. on M1 Macbook Air

Steps to Reproduce:

  1. clone source code of theia-blueprint
  2. run yarn && yarn build command
  3. go to applications/electron folder then run yarn start

Additional Information

  • Operating System: macOS Monterey version: 12.1
  • Theia Version: 1.22.1
output of terminal:
➜  electron git:(master) ✗ yarn start
yarn run v1.22.17
$ electron scripts/theia-electron-main.js
dyld[54558]: Library not loaded: @rpath/libffmpeg.dylib
  Referenced from: /Users/alipinar/Desktop/workspace/theia-blueprint/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework
  Reason: tried: '/Users/alipinar/Desktop/workspace/theia-blueprint/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/Users/alipinar/Desktop/workspace/theia-blueprint/node_modules/electron/dist/Electron.app/Contents/MacOS/../Frameworks/libffmpeg.dylib' (no such file), '/Users/alipinar/Desktop/workspace/theia-blueprint/node_modules/electron/dist/Electron.app/Contents/MacOS/../Frameworks/libffmpeg.dylib' (no such file), '/usr/local/lib/libffmpeg.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/libffmpeg.dylib' (no such file)
/Users/alipinar/Desktop/workspace/theia-blueprint/node_modules/electron/dist/Electron.app/Contents/MacOS/Electron exited with signal SIGABRT
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
➜  electron git:(master) ✗ arch
i386
➜  electron git:(master) ✗ node -p process.arch
x64
➜  electron git:(master) ✗ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions