Install meteor 2.2 on macbook m1

Hey guys!
I’m not able to install meteor version 2.2 on a m1 macbook, it always gives me this error:

npm ERR! command sh -c node cli.js install
npm ERR! /opt/homebrew/lib/node_modules/meteor/config.js:8
npm ERR!   throw new Error('LOCALAPPDATA env var is not set.');
npm ERR!   ^
npm ERR!
npm ERR! Error: LOCALAPPDATA env var is not set.

I even looked at the issues, but they always recommend updating the meteor version, which is not possible here.
I know it’s an old version, but the project I need to run is in this version :tonto:.
Is it possible to reverse this?

Hi, which command are you running to install Meteor?

If you are using NPM, do you have Node.js 14 installed in your machine?

It seems that somehow you are using the Windows installer.

Felipe, i tried to use:
arch -x86_64 npm install -g meteor@2.2
and
npm install -g meteor@2.2

The two gave trouble.
I even tried using nvm to set node in version 14, but the same problem happens.

➜  bash ✗  npm install -g meteor@2.2
/Users/daniel/.nvm/versions/node/v14.16.0/bin/meteor -> /Users/daniel/.nvm/versions/node/v14.16.0/lib/node_modules/meteor/meteor.bat
/Users/daniel/.nvm/versions/node/v14.16.0/bin/meteor-installer -> /Users/daniel/.nvm/versions/node/v14.16.0/lib/node_modules/meteor/cli.js

> meteor@2.2.2 install /Users/daniel/.nvm/versions/node/v14.16.0/lib/node_modules/meteor
> node cli.js install

/Users/daniel/.nvm/versions/node/v14.16.0/lib/node_modules/meteor/config.js:8
  throw new Error('LOCALAPPDATA env var is not set.');
  ^

Error: LOCALAPPDATA env var is not set.
    at Object.<anonymous> (/Users/daniel/.nvm/versions/node/v14.16.0/lib/node_modules/meteor/config.js:8:9)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/Users/daniel/.nvm/versions/node/v14.16.0/lib/node_modules/meteor/install.js:9:59)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! meteor@2.2.2 install: `node cli.js install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the meteor@2.2.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/daniel/.npm/_logs/2022-01-04T21_37_07_865Z-debug.log

Hi, as @renanccastro explained in Slack in order to install on M1 older versions of Meteor you should use Rosetta.

Meteor is available for M1 starting in the version 2.5.1 Meteor Changelog | Meteor API Docs