nvm breaks detox build on MacOS

When using nvm to manage node versions on MacOS(11.1), detox build fails with the following error

nvm is not compatible with the "PREFIX" environment variable: currently set to "/Users/uloco/.nvm/versions/node/v15.6.0"
Run `unset PREFIX` to unset it.
env: node: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code

Ubuntu works fine with nvm.
Also other builds that need node or npm work fine, it is just happening with detox.

Is detox setting the PREFIX environment variable somewhere? Is there any way of working around this problem?

1 possible answer(s) on “nvm breaks detox build on MacOS

  1. This issue just happens with detox build. I do not have any issues with other npm scripts or libraries. That’s why I thought of a detox issue in the first place. I was thinking, that it is quite unlikely that any of you are using nvm and haven’t had any issues regarding this. Thanks for clearing things up.