Closed lolodomo closed 6 years ago
Here is my detailed logs:
0 info it worked if it ends with ok
1 verbose cli [ 'D:\\dev\\openhab2\\git\\smarthome\\extensions\\ui\\org.eclipse.smarthome.ui.paper\\node\\node.exe',
1 verbose cli 'D:\\dev\\openhab2\\git\\smarthome\\extensions\\ui\\org.eclipse.smarthome.ui.paper\\node\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install' ]
2 info using npm@5.0.3
3 info using node@v8.1.2
4 verbose npm-session b3d51170c6b550bc
5 verbose stack Error: Cannot find module 'internal/fs'
5 verbose stack at Function.Module._resolveFilename (module.js:485:15)
5 verbose stack at Function.Module._load (module.js:437:25)
5 verbose stack at Module.require (module.js:513:17)
5 verbose stack at require (internal/module.js:11:18)
5 verbose stack at evalmachine.<anonymous>:40:20
5 verbose stack at Object.<anonymous> (D:\dev\openhab2\git\smarthome\extensions\ui\org.eclipse.smarthome.ui.paper\node\node_modules\npm\node_modules\cmd-shim\node_modules\graceful-fs\fs.js:11:1)
5 verbose stack at Module._compile (module.js:569:30)
5 verbose stack at Object.Module._extensions..js (module.js:580:10)
5 verbose stack at Module.load (module.js:503:32)
5 verbose stack at tryModuleLoad (module.js:466:12)
5 verbose stack at Function.Module._load (module.js:458:3)
5 verbose stack at Module.require (module.js:513:17)
5 verbose stack at require (internal/module.js:11:18)
5 verbose stack at Object.<anonymous> (D:\dev\openhab2\git\smarthome\extensions\ui\org.eclipse.smarthome.ui.paper\node\node_modules\npm\node_modules\cmd-shim\node_modules\graceful-fs\graceful-fs.js:3:27)
5 verbose stack at Module._compile (module.js:569:30)
5 verbose stack at Object.Module._extensions..js (module.js:580:10)
6 verbose cwd D:\dev\openhab2\git\smarthome\extensions\ui\org.eclipse.smarthome.ui.paper
7 verbose Windows_NT 10.0.15063
8 verbose argv "D:\\dev\\openhab2\\git\\smarthome\\extensions\\ui\\org.eclipse.smarthome.ui.paper\\node\\node.exe" "D:\\dev\\openhab2\\git\\smarthome\\extensions\\ui\\org.eclipse.smarthome.ui.paper\\node\\node_modules\\npm\\bin\\npm-cli.js" "install"
9 verbose node v8.1.2
10 verbose npm v5.0.3
11 error code MODULE_NOT_FOUND
12 error Cannot find module 'internal/fs'
13 verbose exit [ 1, true ]
I checked out the current master and did a full build -- no problem.
Then I did the following:
cd extensions/ui/org.eclipse.smarthome.ui.paper/
git clean -x -d -f .
mvn clean install
This triggers the rebuild of the Paper UI using a clean working copy and so should trigger all the npm / nodejs stuff to be fetched.
It ended up in a successful build, too.
@maggu2810 I wouldn't rule out that the problem only exists on Windows. @sjka wanted to test that today as well.
My PC runs Windows 10.
Any chance to fix the build on Windows ?
As I don't use Windows I can't help.
I also have no chance to test this on a windows machine. @lolodomo please try the advices in this SO thread: Cleaning the npm cache manually and then do the build again (npm install is run by our maven build).
Still not work. Maybe my nodejs version is too old ? What nodejs and npm versions are recommended ?
My setup: npm 3.10.10 node v6.11.1
When you run the maven build a local node & npm version is installed:
9 verbose node v8.1.2 10 verbose npm v5.0.3
This works on travis/jenkins/\<my machine> just fine.
You could actually try to build with your local npm as well: just run npm install
in the paper ui root folder. I guess its always a good idea to clean at least the node_modules
folder before doing so.
I just did a build on Windows with a clean repository (see https://github.com/eclipse/smarthome/issues/4863#issuecomment-355967082) and it also ran through (log.txt).
Although the NPM repository has been a bit flaky at times, I can't confirm that there is a general issue with the Paper UI build on Windows. Really, try cleaning your git workspace (or manually delete all the node*
& npm*
folders and package-lock.json
and then build it again.
Sorry, I did not understand that the files to clean up were in my git repository but only searched in the folders that were mentioned in the link provided by @htreu. I will try again this week-end.
Alternatively
git clean -dfx extensions/ui/org.eclipse.smarthome.ui.paper
also does the trick - just note that you'll lose all uncommitted changes from the Paper UI and not only the cache stuff.
Thank you a lot, it is now working after running the git clean command that removed npm files I have not found (not searched at the right place).
Great! Thanks for the feedback.