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: