2015-10-22 26 views
1

我正在构建一个应用程序应用程序,然后将它打包成WAR文件以部署到Liberty运行时。我可以在IBM Bluemix DevOps Services中使用不同版本的节点,构建“npm”构建器类型?

该构建过程会警告我,ember-cli将停止使用节点v0.10.29,并建议使用节点0.12。

我可以在:DevOps Services,构建步骤'npm'构建器类型中使用不同版本的节点吗?

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

v0.10.29是构建映像上存在的唯一节点版本。为了使用不同的版本,用户必须下载它。这里是一个示例脚本如何做到这一点

#!/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 
1

你在你的package.json指定哪些节点版本? Bluemix支持所有当前可用的节点版本,请参阅“Node.js运行时版本”下的the docs以获取更多信息。继续并在package.json中指定所需的版本为engines属性,您应该没问题。

+0

我已经在'packages.json'中指定了我想要的版本作为'engines'属性:'>> = 0.12.0“'。 构建应用程序时的Node.js版本与可用于运行应用程序的Node.js运行时不同。我想在IBM DevOps Services(以前的jazzhub.net)中构建应用程序时更改Node.js版本。 – user1605729

+0

对,您可以使用Cloud Foundry CLI的'-b'选项或'buildpack'选项在'manifest.yml'中指定buildpack。 IBM SDK for node(sdk-for-nodejs_v2_5-20150902-1526)和CloudFoundry [community buildpack](https://github.com/cloudfoundry/nodejs-buildpack)都可以使用。 –

+1

指定buildpack有助于选择在运行时使用的节点版本:[Buildpacks为您的应用程序提供框架和运行时支持](http://docs.cloudfoundry.org/buildpacks/)。 我想更改IBM DevOps管道提供的版本。 – user1605729

相关问题