Meteor on MacOS "can't get arch with uname -p?"

After installing Meteor.js for MacOS, I try to create an app and I get an error related to ‘uname -p’. The application is created, but I get the same error when trying to start the application.

Recreation Steps

curl https://install.meteor.com/ | sh

meteor create app

Output:

/Users/{user}/.meteor/packages/meteor-tool/.1.8.1.4gwv5w.33478++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:218
      throw error;
      ^

Error: can't get arch with uname -p?
    at run (/tools/utils/archinfo.js:151:15)
    at Object.host (/tools/utils/archinfo.js:161:11)
    at ProjectContext.reset (/tools/project-context.js:94:45)
    at new ProjectContext (/tools/project-context.js:60:8)
    at Command.func (/tools/cli/commands.js:769:24)
    at /tools/cli/main.js:1531:15

Then:

cd app

echo "METEOR@1.8.1" >> .meteor/release

meteor

Output:

/Users/{user}/.meteor/packages/meteor-tool/.1.8.1.4gwv5w.33478++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:218
      throw error;
      ^

Error: can't get arch with uname -p?
    at run (/tools/utils/archinfo.js:151:15)
    at Object.host (/tools/utils/archinfo.js:161:11)
    at ProjectContext.reset (/tools/project-context.js:94:45)
    at new ProjectContext (/tools/project-context.js:60:8)
    at Command.doRunCommand [as func] (/tools/cli/commands.js:337:24)
    at /tools/cli/main.js:1531:15

My output from uname -p is i386.

Any help would be appreciated.

Very strange.

Just to check, can you run this and see if vanilla node can find uname:

node -p "require('child_process').execFileSync('uname', ['-p']).toString()"

My best guess is something is messing with your PATH or permissions. Can you post the results of this:

ls -l `which uname`

and

echo $PATH

This returns i386

Returns:

-rwxr-xr-x  1 root  wheel  18432 Jul 16 23:00 /usr/bin/uname

Here is my PATH:

/usr/local/sbin
/usr/local/opt/python/libexec/bin
/usr/local/sbin
/usr/local/opt/python/libexec/bin
/Users/{user}/.nvm/versions/node/v12.8.0/bin
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
/Applications/VMware Fusion.app/Contents/Public/
~/software
~/software

Note: I replaced my username with “{user}”

Okay so your system is fine. It’s just Meteor

Are you able to run meteor node without errors to get into the REPL?

If so, what’s the output of process.env.PATH?
(This should have the value of env that meteor uses)


It looks like Meteor might be making a faulty clone of the outer environment somewhere in here? https://github.com/meteor/meteor/blob/master/tools/cli/dev-bundle-bin-helpers.js#L82-L106

I can get into the node REPL from meteor fine. Here is my output:

$ meteor node
> process.env.PATH.split(':')
[ '/Users/{user}/.meteor/packages/meteor-tool/.1.8.1.4gwv5w.33478++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/bin',
  '/Users/{user}/.meteor/packages/meteor-tool/.1.8.1.4gwv5w.33478++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64',
  '/Users/{user}/.meteor/packages/meteor-tool/.1.8.1.4gwv5w.33478++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/.bin',
  '/usr/local/sbin',
  '/usr/local/opt/python/libexec/bin',
  '/usr/local/sbin',
  '/usr/local/opt/python/libexec/bin',
  '/Users/{user}/.nvm/versions/node/v12.8.0/bin',
  '/usr/local/bin',
  '/usr/bin',
  '/bin',
  '/usr/sbin',
  '/sbin',
  '/Applications/VMware Fusion.app/Contents/Public/',
  '~/software' ]

Very strange, your PATH is totally intact.
Sorry to say, but I’m out of ideas :pensive:

I’d post an issue on github and see if anyone there can help you: Issues · meteor/meteor · GitHub

Very strange, your PATH is totally intact.
Sorry to say, but I’m out of ideas :pensive:
I’d post an issue on github and see if anyone there can help you: Issues · meteor/meteor · GitHub

Thank you for your time. I’ll do that