I am trying to update the node.js version in my AWS elastic beanstalk instance to the latest supported version v8.9.3 included in the latest AMI release from Amazon: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts.platforms.html#concepts.platforms.nodejs
However when I change the version number in Configuration -> Software Configuration -> Node Version -> 8.9.3 I get the following error:
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/tmp/deployment/application/node_modules/synchronize/node_modules/fibers/build'
gyp ERR! System Linux 4.9.76-3.78.amzn1.x86_64
gyp ERR! command "/opt/elasticbeanstalk/node-install/node-v8.9.3-linux-x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v8.9.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /tmp/deployment/application/node_modules/synchronize/node_modules/fibers
gyp ERR! node -v v8.9.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
ETC........
I have updated the instance to Configuration "64bit Amazon Linux 2017.09 v4.4.4 running Node.js" which in the documentation says it supports V8.9.3
I have tried adding a .npmrc file to the project as described in this answer Beanstalk: Node.js deployment - node-gyp fails due to permission denied and I still get the same error.