Missing NODE_VERSION declaration script. To fix incompatible NODE version error
nikopolidi opened this issue · comments
Vitaliy commented
The engine "node" is incompatible with this module. Expected version ">=8.12.0". Got "6.17.0"
error Found incompatible module
btw. I've tried adding appcenter-post-clone.sh scripts with next contents:
#!/usr/bin/env bash
set -ex
brew uninstall node@6
NODE_VERSION="8.12.0"
curl "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}.pkg" > "$HOME/Downloads/node-installer.pkg"
sudo installer -store -pkg "$HOME/Downloads/node-installer.pkg" -target "/"
and
#!/bin/sh
# please specify required Node.js version
NODE_VERSION=8.10.0
# workaround to override the v8 alias
npm config delete prefix
. ~/.bashrc
nvm install "$NODE_VERSION"
nvm alias node8 "$NODE_VERSION"
and still having same incompatible node version error.
Obviously 2nd script won't work since current agent using node v6.x
UPDATE:
First script worked after I initiated build by click on SAVE AND BUILD
button at build settings.
appcenter-post-clone.sh
WON'T WORK automatically on push. You have to initiate build manually after adding this script