npx expo export:web or npx expo build:web?

I am using expo 46.0.7

My mac seems to think my build command is npx expo build:web, but in CI, it seems to think it’s npx expo export:web

I suspect my mac is wrong here, but I don’t know how it got confused. I submit for evidence:

√ jim@jim-mbp:~/development/domo/hub/apps/panel (dev-916)% npx expo export:web
"export:web" is not an expo command. See "expo --help" for the full list of commands.
√ jim@jim-mbp:~/development/domo/hub/apps/panel (dev-916)% npx expo --version 

Is 6.0.2 not the latest expo version where the build command has been changed to export?

The npx expo export:web command is only available on the new local CLI. The global CLI still has the old build:web command.

The only thing I can think of is that maybe the expo package happens to be not installed when you’re running this command from your Mac. On my machine, npx expo --version inside of a project folder after I’ve run yarn (so expo is inside node_modules) returns 0.2.x, which matches the version on the new local CLI package. If I run the same command on any other folder, I get 6.0.x (matching the global CLI package version). In other words, it’s not finding the local install of the local CLI, so it’s falling back to the global.

Thanks, this helped. I managed to fix this by rooting out all instances of expo installed both globally and locally, then reinstalling. It looks like I may have had a rogue entry in my yarn.lock file that was pulling in an older version, though that doesn’t explain what I saw entirely, but if CI didn’t have that rogue entry it could explain why it was working and my mac was not.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.