Hi Rachel,
Thanks for your response. There are a few things here which are confusing me:
1. the build log says "Running 'npm install --color=false' in
/var/lib/jenkins/jobs/Upgrade APIMAN/workspace/manager/ui/war"
is that correct? (it seems like it's trying to run a globally installed npm...) If
it's trying to use a locally installed npm, why isn't is using a relative path to
it?
2. If I change manager/ui/war/node/npm so that NODE_EXE=./node/node (instead of
"node") it succeeds.
3. The failing job is being run by Jenkins, and the Jenkins user has no node on it's
path. But if I run the build as a different user who does, it works.
It seems that the plugin which installs nodejs locally, or some subsequent part of the
build process, isn't referring to them correctly (and thus is dependent on a globally
installed node in order to work). Any insight? For what it's worth I can build the
exact same source, from the same repo, with the same command, on my mac, which has node
and npm installed globally.
Thanks,
Chris
________________________________
From: Rachel Yordan <ryordan(a)redhat.com>
Sent: Wednesday, June 15, 2016 1:21:53 PM
To: Christopher Stolte
Cc: apiman-user(a)lists.jboss.org
Subject: Re: [Apiman-user] building apiman on Redhat
Hey Chris,
When you run `$ npm install` or even `$ node -v` you are using the globally installed
binary as opposed to the local one, even if you are within the directory, as you can see
here:
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm"
"install" "--color=false"
The deprecation warning at the end of the build log should not be enough to cause a build
failure. To get a more detailed error regarding the build failure I'd try using the
local binary from within the `war` directory you were in with `$ node/npm install
--color=false`. You can also test that it's using the correct binary with `$ node/npm
-v` or `$ node/node -v`. What is causing the build to fail could be several things, but I
always recommend starting with a clean slate before each test build -- try running the
following before triggering your build again:
$ rm -rf node_modules/
$ npm cache clean
Feel free to ping me on IRC if that doesn't help you get a better idea of what's
going on. Hope it helps! :)
Rachel Yordán
IRC: ryordan
GH: @kahboom<https://github.com/kahboom>
On Wed, Jun 15, 2016 at 10:59 AM, Christopher Stolte
<cstolte@ebsco.com<mailto:cstolte@ebsco.com>> wrote:
Hello,
I am trying to build apiman-1.2.6.Final on Redhat. Server details:
$ uname -or
3.10.0-229.el7.x86_64 GNU/Linux
$ java -version
openjdk version "1.8.0_91"
The build fails at this point:
[INFO] --- frontend-maven-plugin:0.0.27:install-node-and-npm (install node and npm) @
apiman-manager-ui-war ---
[INFO] Found proxies: []
[INFO] Installing node version v5.6.0
[INFO] Creating temporary directory /home/cloud-user/apiman-build/manager/ui/war/node_tmp
[INFO] Downloading Node.js from
https://nodejs.org/dist/v5.6.0/node-v5.6.0-linux-x64.tar.gz to
/home/cloud-user/apiman-build/manager/ui/war/node_tmp/node.tar.gz
[INFO] No proxies configured
[INFO] No proxy was configured, downloading directly
[INFO] Extracting Node.js files in node_tmp
[INFO] Unpacking /home/cloud-user/apiman-build/manager/ui/war/node_tmp/node.tar.gz into
/home/cloud-user/apiman-build/manager/ui/war/node_tmp
[INFO] Moving node binary to /home/cloud-user/apiman-build/manager/ui/war/node/node
[INFO] Deleting temporary directory /home/cloud-user/apiman-build/manager/ui/war/node_tmp
[INFO] Installed node locally.
[INFO] Installing npm version 3.6.0
[INFO] Downloading NPM from
http://registry.npmjs.org/npm/-/npm-3.6.0.tgz to
/home/cloud-user/apiman-build/manager/ui/war/npm.tar.gz
[INFO] No proxies configured
[INFO] No proxy was configured, downloading directly
[INFO] Extracting NPM files in node/
[INFO] Unpacking /home/cloud-user/apiman-build/manager/ui/war/npm.tar.gz into
/home/cloud-user/apiman-build/manager/ui/war/node/node_modules
[INFO] Installed NPM locally.
[INFO]
[INFO] --- frontend-maven-plugin:0.0.27:npm (npm install) @ apiman-manager-ui-war ---
[INFO] Found proxies: []
[INFO] Running 'npm install --color=false' in
/home/cloud-user/apiman-build/manager/ui/war
[ERROR] npm WARN deprecated graceful-fs(a)1.2.3: graceful-fs v3.0.0 and before will fail on
node releases >= v7.0. Please update to graceful-fs(a)^4.0.0 as soon as possible. Use
'npm ls graceful-fs' to find it in the tree.
Node/npm appear to be globally installed:
$ npm -v
2.15.1
$ node -v
v4.4.3
I then tried to execute that npm command from the stated directory, and got this:
$ cd manager/ui/war
$ npm install --color=false
npm WARN peerDependencies The peer dependency marked(a)^0.3.3 included from marked-terminal
will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it
explicitly.
npm WARN prefer global marked(a)0.3.5 should be installed with -g
npm WARN deprecated graceful-fs(a)1.2.3: graceful-fs v3.0.0 and before will fail on node
releases >= v7.0. Please update to graceful-fs(a)^4.0.0 as soon as possible. Use 'npm
ls graceful-fs' to find it in the tree.
npm WARN peerDependencies The peer dependency grunt(a)>=0.4.0 included from
grunt-contrib-cssmin will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it
explicitly.
npm WARN peerDependencies The peer dependency grunt(a)~0.4.1 included from grunt-jekyll will
no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it
explicitly.
npm WARN peerDependencies The peer dependency grunt(a)~0.4.5 included from
grunt-contrib-less will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it
explicitly.
npm WARN peerDependencies The peer dependency grunt(a)~0.4.0 included from
grunt-contrib-uglify will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it
explicitly.
npm WARN peerDependencies The peer dependency grunt(a)~0.4.0 included from
grunt-contrib-connect will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it
explicitly.
npm WARN deprecated lodash(a)2.4.1: lodash(a)<3.0.0 is no longer maintained. Upgrade to
lodash(a)^4.0.0.
npm WARN peerDependencies The peer dependency grunt(a)~0.4.0 included from
grunt-contrib-watch will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it
explicitly.
npm ERR! Linux 3.10.0-229.el7.x86_64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm"
"install" "--color=false"
npm ERR! node v4.4.3
npm ERR! npm v2.15.1
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported
npm ERR! notsup Not compatible with your operating system or architecture: fsevents(a)1.0.8
npm ERR! notsup Valid OS: darwin
npm ERR! notsup Valid Arch: any
npm ERR! notsup Actual OS: linux
npm ERR! notsup Actual Arch: x64
npm ERR! Please include the following file with any support request:
npm ERR! /home/cloud-user/apiman-build/manager/ui/war/npm-debug.log
Does anyone have an idea as to what is going on here? I see some threads about the maven
plugin that installs node/npm locally (
https://issues.jboss.org/browse/APIMAN-771), but it
isn't quite what's going on here. I'm especially confused about versions,
since the plugin installed versions [5.6.0/3.6.0] locally but the above error message is
referencing the globally installed versions [4.4.3/2.15.1].
Any help much appreciated!
Chris
_______________________________________________
Apiman-user mailing list
Apiman-user@lists.jboss.org<mailto:Apiman-user@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/apiman-user