{"action":"created","issue":{"url":"https://api.github.com/repos/eirslett/frontend-maven-plugin/issues/224","labels_url":"https://api.github.com/repos/eirslett/frontend-maven-plugin/issues/224/labels{/name}","comments_url":"https://api.github.com/repos/eirslett/frontend-maven-plugin/issues/224/comments","events_url":"https://api.github.com/repos/eirslett/frontend-maven-plugin/issues/224/events","html_url":"https://github.com/eirslett/frontend-maven-plugin/issues/224","id":84580235,"number":224,"title":"Can not install npm on bamboo via maven","user":{"login":"jeiroa","id":12732000,"avatar_url":"https://avatars.githubusercontent.com/u/12732000?v=3","gravatar_id":"","url":"https://api.github.com/users/jeiroa","html_url":"https://github.com/jeiroa","followers_url":"https://api.github.com/users/jeiroa/followers","following_url":"https://api.github.com/users/jeiroa/following{/other_user}","gists_url":"https://api.github.com/users/jeiroa/gists{/gist_id}","starred_url":"https://api.github.com/users/jeiroa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeiroa/subscriptions","organizations_url":"https://api.github.com/users/jeiroa/orgs","repos_url":"https://api.github.com/users/jeiroa/repos","events_url":"https://api.github.com/users/jeiroa/events{/privacy}","received_events_url":"https://api.github.com/users/jeiroa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-03T14:00:57Z","updated_at":"2015-06-03T22:14:04Z","closed_at":null,"body":"Hi,\r\n\r\nI am trying to execute the maven goal clean install on bamboo CI server and I get this error:\r\n\r\n[INFO] ` /home/bamboo/bamboo-agent-home/xml-data/build-dir/ESPCC-UI-JOB1/node_modules/gulp-sass/node_modules/node-sass/vendor/linux-x64-11/binding.node ` exists.\r\n[INFO]  testing binary.\r\n[INFO] Binary is fine; exiting.\r\n[INFO] \r\n[INFO] > gravity-central-control-ui@0.0.0 postinstall /home/bamboo/bamboo-agent-home/xml-data/build-dir/ESPCC-UI-JOB1\r\n[INFO] > cd node_modules/qTip2 && npm run build\r\n[INFO] \r\n[ERROR] sh: 1: npm: Permission denied\r\n[ERROR] \r\n[ERROR] npm ERR! gravity-central-control-ui@0.0.0 postinstall: `cd node_modules/qTip2 && npm run build`\r\n[ERROR] npm ERR! Exit status 127\r\n[ERROR] npm ERR! \r\n[ERROR] npm ERR! Failed at the gravity-central-control-ui@0.0.0 postinstall script.\r\n[ERROR] npm ERR! This is most likely a problem with the gravity-central-control-ui package,\r\n[ERROR] npm ERR! not with npm itself.\r\n[ERROR] npm ERR! Tell the author that this fails on your system:\r\n[ERROR] npm ERR!     cd node_modules/qTip2 && npm run build\r\n[ERROR] npm ERR! You can get their info via:\r\n[ERROR] npm ERR!     npm owner ls gravity-central-control-ui\r\n[ERROR] npm ERR! There is likely additional logging output above.\r\n[ERROR] npm ERR! System Linux 3.11.0-17-generic\r\n[ERROR] npm ERR! command \"/home/bamboo/bamboo-agent-home/xml-data/build-dir/ESPCC-UI-JOB1/node/node\" \"/home/bamboo/bamboo-agent-home/xml-data/build-dir/ESPCC-UI-JOB1/node/npm/bin/npm-cli.js\" \"install\" \"--color=false\"\r\n[ERROR] npm ERR! cwd /home/bamboo/bamboo-agent-home/xml-data/build-dir/ESPCC-UI-JOB1\r\n[ERROR] npm ERR! node -v v0.10.38\r\n[ERROR] npm ERR! npm -v 1.4.28\r\n[ERROR] npm ERR! code ELIFECYCLE\r\n[ERROR] npm ERR! \r\n[ERROR] npm ERR! Additional logging details can be found in:\r\n[ERROR] npm ERR!     /home/bamboo/bamboo-agent-home/xml-data/build-dir/ESPCC-UI-JOB1/npm-debug.log\r\n[ERROR] npm ERR! not ok code 0\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] BUILD FAILURE\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] Total time: 01:02 min\r\n[INFO] Finished at: 2015-06-03T13:36:38+00:00\r\n[INFO] Final Memory: 15M/1963M\r\n[INFO] ------------------------------------------------------------------------\r\n[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.23:npm (npm install) on project esp-ui: Failed to run task: 'npm install --color=false' failed. (error code 1) -> [Help 1]\r\norg.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.23:npm (npm install) on project esp-ui: Failed to run task\r\n\tat org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)\r\n\tat org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)\r\n\tat org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)\r\n\tat org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)\r\n\tat org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)\r\n\tat org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)\r\n\tat org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)\r\n\tat org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)\r\n\tat org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)\r\n\tat org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)\r\n\tat org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)\r\n\tat org.apache.maven.cli.MavenCli.main(MavenCli.java:157)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:483)\r\n\tat org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)\r\n\tat org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)\r\n\tat org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)\r\n\tat org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)\r\nCaused by: org.apache.maven.plugin.MojoFailureException: Failed to run task\r\n\tat com.github.eirslett.maven.plugins.frontend.mojo.NpmMojo.execute(NpmMojo.java:62)\r\n\tat org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)\r\n\tat org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)\r\n\t... 19 more\r\nCaused by: com.github.eirslett.maven.plugins.frontend.lib.TaskRunnerException: 'npm install --color=false' failed. (error code 1)\r\n\tat com.github.eirslett.maven.plugins.frontend.lib.NodeTaskExecutor.execute(NodeTaskExecutor.java:38)\r\n\tat com.github.eirslett.maven.plugins.frontend.mojo.NpmMojo.execute(NpmMojo.java:59)\r\n\t... 21 more\r\n[ERROR] \r\n[ERROR] \r\n[ERROR] For more information about the errors and possible solutions, please read the following articles:\r\n[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException\r\nsimple\t03-Jun-2015 14:36:38\tFailing task since return code of [/opt/apache-maven-3.2.1/bin/mvn --batch-mode -Djava.io.tmpdir=/tmp/ESPCC-UI-JOB1 clean install -X] was 1 while expected 0\r\n\r\nThis is the final part of the npm-debug.log:\r\n\r\n115828 info gravity-central-control-ui@0.0.0 Failed to exec postinstall script\r\n115829 error gravity-central-control-ui@0.0.0 postinstall: `cd node_modules/qTip2 && npm run build`\r\n115829 error Exit status 127\r\n115830 error Failed at the gravity-central-control-ui@0.0.0 postinstall script.\r\n115830 error This is most likely a problem with the gravity-central-control-ui package,\r\n115830 error not with npm itself.\r\n115830 error Tell the author that this fails on your system:\r\n115830 error     cd node_modules/qTip2 && npm run build\r\n115830 error You can get their info via:\r\n115830 error     npm owner ls gravity-central-control-ui\r\n115830 error There is likely additional logging output above.\r\n115831 error System Linux 3.11.0-17-generic\r\n115832 error command \"/home/bamboo/bamboo-agent-home/xml-data/build-dir/ESPCC-UI-JOB1/node/node\" \"/home/bamboo/bamboo-agent-home/xml-data/build-dir/ESPCC-UI-JOB1/node/npm/bin/npm-cli.js\" \"install\" \"--color=false\"\r\n115833 error cwd /home/bamboo/bamboo-agent-home/xml-data/build-dir/ESPCC-UI-JOB1\r\n115834 error node -v v0.10.38\r\n115835 error npm -v 1.4.28\r\n115836 error code ELIFECYCLE\r\n115837 verbose exit [ 1, true ]\r\n\r\nI found out that npm can not be found (it is not globally installed in the elastic instance) so I added /home/bamboo/bamboo-agent-home/xml-data/build-dir/ESPCC-UI-JOB1/node/npm/bin to PATH and now the error is:\r\n\r\n[INFO] > gravity-central-control-ui@0.0.0 postinstall /home/bamboo/bamboo-agent-home/xml-data/build-dir/ESPCC-UI-JOB1\r\n[INFO] > cd node_modules/qTip2 && npm run build\r\n[INFO] \r\n[ERROR] \r\n[ERROR] module.js:340\r\n[ERROR]     throw err;\r\n[ERROR]           ^\r\n[ERROR] Error: Cannot find module '/home/bamboo/bamboo-agent-home/xml-data/build-dir/ESPCC-UI-JOB1/node/npm/bin/node_modules/npm/bin/npm-cli.js'\r\n[ERROR]     at Function.Module._resolveFilename (module.js:338:15)\r\n[ERROR]     at Function.Module._load (module.js:280:25)\r\n[ERROR]     at Function.Module.runMain (module.js:497:10)\r\n[ERROR]     at startup (node.js:119:16)\r\n[ERROR]     at node.js:935:3\r\n[ERROR] \r\n[ERROR] npm ERR! gravity-central-control-ui@0.0.0 postinstall: `cd node_modules/qTip2 && npm run build`\r\n[ERROR] npm ERR! Exit status 8\r\n[ERROR] npm ERR! \r\n[ERROR] npm ERR! Failed at the gravity-central-control-ui@0.0.0 postinstall script.\r\n[ERROR] npm ERR! This is most likely a problem with the gravity-central-control-ui package,\r\n[ERROR] npm ERR! not with npm itself.\r\n[ERROR] npm ERR! Tell the author that this fails on your system:\r\n[ERROR] npm ERR!     cd node_modules/qTip2 && npm run build\r\n[ERROR] npm ERR! You can get their info via:\r\n[ERROR] npm ERR!     npm owner ls gravity-central-control-ui\r\n[ERROR] npm ERR! There is likely additional logging output above.\r\n[ERROR] npm ERR! System Linux 3.11.0-17-generic\r\n[ERROR] npm ERR! command \"/home/bamboo/bamboo-agent-home/xml-data/build-dir/ESPCC-UI-JOB1/node/node\" \"/home/bamboo/bamboo-agent-home/xml-data/build-dir/ESPCC-UI-JOB1/node/npm/bin/npm-cli.js\" \"install\" \"--color=false\"\r\n[ERROR] npm ERR! cwd /home/bamboo/bamboo-agent-home/xml-data/build-dir/ESPCC-UI-JOB1\r\n[ERROR] npm ERR! node -v v0.10.38\r\n[ERROR] npm ERR! npm -v 1.4.28\r\n[ERROR] npm ERR! code ELIFECYCLE\r\n[ERROR] npm ERR! \r\n[ERROR] npm ERR! Additional logging details can be found in:\r\n[ERROR] npm ERR!     /home/bamboo/bamboo-agent-home/xml-data/build-dir/ESPCC-UI-JOB1/npm-debug.log\r\n[ERROR] npm ERR! not ok code 0\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] BUILD FAILURE\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] Total time: 6.377 s\r\n[INFO] Finished at: 2015-06-03T13:50:09+00:00\r\n[INFO] Final Memory: 26M/1963M\r\n[INFO] ------------------------------------------------------------------------\r\n[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.23:npm (npm install) on project esp-ui: Failed to run task: 'npm install --color=false' failed. (error code 1) -> [Help 1]\r\n\r\nIt seems path to npm-cli.js is wrong.\r\n\r\nIt is working in my local machine (Ubuntu 14.04) but if I npm I get the same errors.\r\n\r\npom.xml section is:\r\n<plugin>\r\n        <groupId>com.github.eirslett</groupId>\r\n        <artifactId>frontend-maven-plugin</artifactId>\r\n        <version>0.0.23</version>\r\n        <executions>\r\n            <execution>\r\n                <!-- optional: you don't really need execution ids,\r\n                but it looks nice in your build log. -->\r\n                <id>install node and npm</id>\r\n                <goals>\r\n                    <goal>install-node-and-npm</goal>\r\n                </goals>\r\n                <!-- optional: default phase is \"generate-resources\" -->\r\n                <phase>generate-resources</phase>\r\n                <configuration>\r\n                    <nodeVersion>v0.10.38</nodeVersion>\r\n                    <npmVersion>1.4.28</npmVersion>\r\n                    <!-- optional: where to download node and npm from. Defaults to http://nodejs.org/dist/ -->\r\n                    <!--<downloadRoot>http://myproxy.example.org/nodejs/dist/</downloadRoot>-->\r\n                </configuration>\r\n            </execution>\r\n            <execution>\r\n                <id>npm install</id>\r\n                <goals>\r\n                    <goal>npm</goal>\r\n                </goals>\r\n\r\n                <!-- optional: default phase is \"generate-resources\" -->\r\n                <phase>generate-resources</phase>\r\n\r\n                <configuration>\r\n                    <!-- optional: The default argument is actually\r\n                    \"install\", so unless you need to run some other npm command,\r\n                    you can remove this whole <configuration> section.\r\n                    -->\r\n                    <arguments>install</arguments>\r\n                </configuration>\r\n            </execution>\r\n            <execution>\r\n                <id>gulp build</id>\r\n                <goals>\r\n                    <goal>gulp</goal>\r\n                </goals>\r\n\r\n                <!-- optional: the default phase is \"generate-resources\" -->\r\n                <phase>generate-resources</phase>\r\n\r\n                <configuration>\r\n                    <!-- optional: if not specified, it will run gulp's default\r\n                    task (and you can remove this whole <configuration> section.) -->\r\n                    <arguments>build --production</arguments>\r\n                </configuration>\r\n            </execution>\r\n        </executions>\r\n    </plugin>\r\n\r\n  I do not know how to solve the issue. Can someone help me, please?\r\n\r\n  Thanks."},"comment":{"url":"https://api.github.com/repos/eirslett/frontend-maven-plugin/issues/comments/108630227","html_url":"https://github.com/eirslett/frontend-maven-plugin/issues/224#issuecomment-108630227","issue_url":"https://api.github.com/repos/eirslett/frontend-maven-plugin/issues/224","id":108630227,"user":{"login":"eirslett","id":1872593,"avatar_url":"https://avatars.githubusercontent.com/u/1872593?v=3","gravatar_id":"","url":"https://api.github.com/users/eirslett","html_url":"https://github.com/eirslett","followers_url":"https://api.github.com/users/eirslett/followers","following_url":"https://api.github.com/users/eirslett/following{/other_user}","gists_url":"https://api.github.com/users/eirslett/gists{/gist_id}","starred_url":"https://api.github.com/users/eirslett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eirslett/subscriptions","organizations_url":"https://api.github.com/users/eirslett/orgs","repos_url":"https://api.github.com/users/eirslett/repos","events_url":"https://api.github.com/users/eirslett/events{/privacy}","received_events_url":"https://api.github.com/users/eirslett/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T22:14:04Z","updated_at":"2015-06-03T22:14:04Z","body":"Did you use the npm script from the frontend-maven-plugin? Or from the default npm bubdle?"}}