Hello, I’m trying to build a Spring Boot project containing a simple Vaadin view in Jenkins. I use the com.github.eirslett maven plugin to install Node into the project. When Node runs I get this error;
[INFO]
Running `npm install` ...
> @vaadin/vaadin-usage-statistics@2.0.4 postinstall /home/jenkins/agent/workspace/xxxxxxxxxxxxxxxxxxxxxxxxxx/service/node_modules/@vaadin/vaadin-core-shrinkwrap/node_modules/@vaadin/vaadin-usage-statistics
> node check.js
Vaadin collects development time usage statistics to improve this product. To opt-out, either run:
npm explore @vaadin/vaadin-usage-statistics -- npm run disable
to store disable statistics for the machine, or add
"vaadin": { "disableUsageStatistics": true }
to the project package.json and re-run npm install to disable statistics for the project.
For more details, see https://github.com/vaadin/vaadin-usage-statistics
Error while copying file!
/home/jenkins/agent/workspace/xxxxxxxxxxxxxxxxxxxxxxxxxx/service/node_modules/@vaadin/vaadin-core-shrinkwrap/node_modules/@vaadin/vaadin-usage-statistics/check.js:49
throw err;
^
Error: EACCES: permission denied, copyfile 'vaadin-usage-statistics-collect.js' -> 'vaadin-usage-statistics.js'
at Object.copyFileSync (fs.js:1728:3)
at Object.<anonymous> (/home/jenkins/agent/workspace/xxxxxxxxxxxxxxxxxxxxxxxxxxx/service/node_modules/@vaadin/vaadin-core-shrinkwrap/node_modules/@vaadin/vaadin-usage-statistics/check.js:46:8)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
npm WARN no-name@ No description
npm WARN no-name@ No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @vaadin/vaadin-usage-statistics@2.0.4 postinstall: `node check.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @vaadin/vaadin-usage-statistics@2.0.4 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-09-16T16_40_04_907Z-debug.log
The product is building in a temporary Jenkins node, so I don’t have access to the error logs. Is there anyone out there who can tell me what’s going on? Would like to implement Vaadin in some of our projects.
I checked in a copy of package.json that contained the aforementioned disableUsageStatistics line, but I’m still getting the same error:
[INFO]
Running `npm install` ...
> @vaadin/vaadin-usage-statistics@2.0.10 postinstall /home/jenkins/agent/workspace/xxxxxx/service/node_modules/@vaadin/vaadin-core-shrinkwrap/node_modules/@vaadin/vaadin-usage-statistics
> node check.js
Vaadin collects development time usage statistics to improve this product. To opt-out, either run:
npm explore @vaadin/vaadin-usage-statistics -- npm run disable
to store disable statistics for the machine, or add
"vaadin": { "disableUsageStatistics": true }
to the project package.json and re-run npm install to disable statistics for the project.
For more details, see https://github.com/vaadin/vaadin-usage-statistics
Error while copying file!
/home/jenkins/agent/workspace/xxxxxx/service/node_modules/@vaadin/vaadin-core-shrinkwrap/node_modules/@vaadin/vaadin-usage-statistics/check.js:41
throw err;
^
Error: EACCES: permission denied, copyfile 'vaadin-usage-statistics-collect.js' -> 'vaadin-usage-statistics.js'
at Object.copyFileSync (fs.js:1728:3)
at Object.<anonymous> (/home/jenkins/agent/workspace/xxxxxx/service/node_modules/@vaadin/vaadin-core-shrinkwrap/node_modules/@vaadin/vaadin-usage-statistics/check.js:38:8)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
npm WARN no-name@ No description
npm WARN no-name@ No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @vaadin/vaadin-usage-statistics@2.0.10 postinstall: `node check.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @vaadin/vaadin-usage-statistics@2.0.10 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-10-08T10_27_37_662Z-debug.log
[ERROR]
>>> Dependency ERROR. Check that all required dependencies are deployed in npm repositories.
[INFO]
Running `npm install` ...
> @vaadin/vaadin-usage-statistics@2.0.11 postinstall /home/jenkins/agent/workspace/XXXXXXXXXXXXXXXXXXXXXX/service/node_modules/@vaadin/flow-deps/node_modules/@vaadin/vaadin-core-shrinkwrap/node_modules/@vaadin/vaadin-usage-statistics
> node check.js
Vaadin collects development time usage statistics to improve this product. To opt-out, either run:
npm explore @vaadin/vaadin-usage-statistics -- npm run disable
to store disable statistics for the machine, or add
"vaadin": { "disableUsageStatistics": true }
to the project package.json and re-run npm install to disable statistics for the project.
For more details, see https://github.com/vaadin/vaadin-usage-statistics
> @vaadin/vaadin-usage-statistics@2.0.11 postinstall /home/jenkins/agent/workspace/XXXXXXXXXXXXX/service/node_modules/@vaadin/vaadin-usage-statistics
> node check.js
Error while copying file!
/home/jenkins/agent/workspace/XXXXXXXXXX/service/node_modules/@vaadin/vaadin-usage-statistics/check.js:25
throw err;
^
Error: EACCES: permission denied, copyfile 'vaadin-usage-statistics-optout.js' -> 'vaadin-usage-statistics.js'
at Object.copyFileSync (fs.js:1728:3)
at Object.<anonymous> (/home/jenkins/agent/workspace/XXXXXXXXXXXXXXXXXX/service/node_modules/@vaadin/vaadin-usage-statistics/check.js:22:8)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
npm WARN no-name@ No description
npm WARN no-name@ No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @vaadin/vaadin-usage-statistics@2.0.11 postinstall: `node check.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @vaadin/vaadin-usage-statistics@2.0.11 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-10-21T13_41_38_831Z-debug.log
[ERROR]
>>> Dependency ERROR. Check that all required dependencies are deployed in npm repositories.
And, starting with Vaadin 14.0.9 I now get this error at attempted startup in Docker.
2019-10-21T13:38:32.027Z [level=ERROR thread=main logger=c.v.f.s.f.FrontendToolsLocator ]
Failed to execute the command '[which, npm]
'\njava.io.IOException: Cannot run program \"which\": error=2, No such file or directory\n\tat java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
at com.vaadin.flow.server.frontend.FrontendToolsLocator.executeCommand(FrontendToolsLocator.java:117)
at com.vaadin.flow.server.frontend.FrontendToolsLocator.tryLocateTool(FrontendToolsLocator.java:73)
at com.vaadin.flow.server.frontend.FrontendUtils.getExecutable(FrontendUtils.java:284)
at com.vaadin.flow.server.frontend.FrontendUtils.getNpmExecutable(FrontendUtils.java:251)
at com.vaadin.flow.server.frontend.TaskRunNpmInstall.runNpmInstall(TaskRunNpmInstall.java:79)
at com.vaadin.flow.server.frontend.TaskRunNpmInstall.execute(TaskRunNpmInstall.java:55)
at com.vaadin.flow.server.frontend.NodeTasks.execute(NodeTasks.java:372)
at com.vaadin.flow.server.startup.DevModeInitializer.initDevModeHandler(DevModeInitializer.java:322)
at com.vaadin.flow.spring.VaadinServletContextInitializer$DevModeServletContextListener.contextInitialized(VaadinServletContextInitializer.java:323)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:952)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:558)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:917)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:370)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1497)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1459)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:847)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:287)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
... 34 frames truncated
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.ProcessImpl.forkAndExec(ProcessImpl.java)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:340)
at java.lang.ProcessImpl.start(ProcessImpl.java:271)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
... 53 common frames omitted