Max M1 (once again)

Hello!

Can’t get meteor 2.7.3 running on Mac M1. Getting this error Bad CPU type in executable:

=> Started proxy.
=> Started HMR server.
arch: posix_spawnp:
/Users/a.pivovarov/.meteor/packages/meteor-tool/.2.7.3.1liadnk.e36f++os.osx.arm64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.arm64/dev_bundle/mongodb/bin/mongod: Bad CPU type in executable
Unexpected mongo exit code 1. Restarting.
arch: posix_spawnp:
/Users/a.pivovarov/.meteor/packages/meteor-tool/.2.7.3.1liadnk.e36f++os.osx.arm64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.arm64/dev_bundle/mongodb/bin/mongod: Bad CPU type in executable
Unexpected mongo exit code 1. Restarting.
arch: posix_spawnp:
/Users/a.pivovarov/.meteor/packages/meteor-tool/.2.7.3.1liadnk.e36f++os.osx.arm64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.arm64/dev_bundle/mongodb/bin/mongod: Bad CPU type in executable
Unexpected mongo exit code 1. Restarting.
Can't start Mongo server.
MongoDB failed global initialization

When I checked mongod in this directory file …/mongod it says that it’s for x86: /mongod: Mach-O 64-bit executable x86_6

I’m not sure about this solution, but I had similar problems, and re-installing meteor fixed it for me.

The other option is to run mongo as a separate process, and use something like this

 MONGO_URL=mongodb://localhost/my-database meteor run

This also has the advantage that a meteor reset doesn’t blow away your data

The other option is to run mongo as a separate process

Thanks, probably I will go this way.

I’m not sure about this solution, but I had similar problems, and re-installing meteor fixed it for me.

I did it multiple times with different versions. The strange thing is - I downloaded tarball with installation manually and I found that the bundled mongod is for x86 architecture. I tried to replace it with arm64 version I installed separately but again I got the same error.

It seems to me that rosetta is not required for meteor itself but it does required for running mongodb in development… :man_shrugging:t2:

Has this been resolved? If so, please explain how.

I gave up for now. Will try to run MongoDB as a separate process when I have time for experiments. Using rosetta terminal should help too.

I had the same problem, I solved it with install meteor with npm install -g meteor instead or sh script and it works :slight_smile:

3 Likes

Same here, not sure why but it only works with npm install -g meteor
I’ll ask to someone to take a closer look into it