Open
Description
Everytime i want to create an app on my mac machine, it starts the server, opens the frontend and then the server just throws and error and shuts down. This is the error it throws:
✔ Building Encore application graph... Done!
✔ Analyzing service topology... Done!
✔ Starting Encore application... Done!
Encore development server running!
Your API is running at: http://127.0.0.1:4000
Development Dashboard URL: http://127.0.0.1:9400/mqrmc
Error: dlopen(/opt/homebrew/Cellar/encore/1.43.8/libexec/runtimes/js/encore-runtime.node, 0x0001): tried: '/opt/homebrew/Cellar/encore/1.43.8/libexec/runtimes/js/encore-runtime.node' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/encore/1.43.8/libexec/runtimes/js/encore-runtime.node' (no such file), '/opt/homebrew/Cellar/encore/1.43.8/libexec/runtimes/js/encore-runtime.node' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1144:18)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at Object.<anonymous> (/Users/mymachine/example-encore/node_modules/encore.dev/dist/internal/runtime/napi/napi.cjs:11:22)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12) {
code: 'ERR_DLOPEN_FAILED'
}
I have tried all templates, even the empty one. This happens on all of them. What is the issue here?
Metadata
Assignees
Labels
No labels
Activity
jainkuniya commentedon Nov 10, 2024
I am also getting the same issue
ekerfelt commentedon Nov 15, 2024
Are you running MacOS on arm64 or x86_64?
(you'll find it by running e.g.
uname -a
in a terminal)rapidsfirst commentedon Jan 2, 2025
I have the same issue and I have a Mac M1 laptop running encore run in iTerm with Rosetta checked so it’s running with x86_64. I’m guessing by your question that’s my issue on why I can’t get encore to run in the terminal. So do I have a install encore and reinstall with brew again with an unchecked Rosetta iTerm?
kaufmann42 commentedon Jan 12, 2025
+1 I guess we're just not supporting new macs. Seems like a big market to lose
eandre commentedon Jan 12, 2025
Encore is perfectly well supported on macOS, both Apple Silicon (arm64) and Intel (x86_64). Almost everybody on the Encore development team uses an Apple Silicon MacBook, in fact. The issue here is when installing via Homebrew with Homebrew being set up incorrectly, i.e. using an x86_64 install of Homebrew on an Apple Silicon Mac. That leads to Homebrew installing the x86_64 version of Encore, which doesn't work when loading the native library.
Your options are to reinstall Homebrew using the correct architecture (arm64), or to install Encore via the Linux instructions (which also work on macOS), which will correctly detect the correct architecture.