Can I use a different version of Node in the: IBM

2019-07-17 19:34发布

I am building an ember application and then packaging it into a WAR file for deployment to a liberty runtime.

The ember build process warns me that ember-cli will cease to work with node v0.10.29 and recommends using node 0.12.

Can I use a different version of Node in the: DevOps Services, build step 'npm' builder type?

Future versions of Ember CLI will not support v0.10.29. Please update to Node 0.12 or io.js. version: 0.2.7 1.13.8

Could not find watchman, falling back to NodeWatcher for file system events. Visit http://www.ember-cli.com/#watchman for more info. BuildingBuilding.Building..Building...BuildingBuilding.Building..Building...BuildingBuilding.Building..Building...BuildingBuilding.Building..Building...BuildingBuilding.(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral. (node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral. ... (repeated node warnings) ... (node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral.

RangeError: Maximum call stack size exceeded Build step 'Execute shell' marked build as failure Finished: FAILURE

2条回答
放我归山
2楼-- · 2019-07-17 19:49

v0.10.29 is the only version of node that exists on the build image. In order to use a different version the user must download it. Here is an example script of how to do that

#!/bin/bash
node_version=v0.12.7
install_name=node-v0.12.7-linux-x64
if [ ! -e $install_name.tar.gz ]; then
wget "http://nodejs.org/dist/$node_version/$install_name.tar.gz"
echo 'Untarring'
tar xf $install_name.tar.gz
fi
NODE_12_INSTALL_DIR=`pwd`/$install_name/bin
PATH=$NODE_12_INSTALL_DIR:$PATH
node -v
查看更多
闹够了就滚
3楼-- · 2019-07-17 20:02

What node version did you specify in your package.json? Bluemix supports all currently available node versions, look at the docs under "Node.js runtime versions" for more information. Go ahead and specify the needed version in your package.json as an engines property and you should be fine.

查看更多
登录 后发表回答