我正在构建一个 ember 应用程序,然后将其打包到 WAR 文件中以部署到 liberty 运行时。
ember 构建过程警告我 ember-cli 将停止与 Node v0.10.29 配合使用,并建议使用 Node 0.12。
我可以在 DevOps Services、构建步骤“npm”构建器类型中使用不同版本的 Node 吗?
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
最佳答案
v0.10.29 是构建镜像中存在的唯一 Node 版本。为了使用不同的版本,用户必须下载它。这是如何执行此操作的示例脚本
#!/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
关于node.js - 我可以在 : IBM Bluemix DevOps Services, 构建步骤 'npm' 构建器类型中使用不同版本的 Node 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33290994/