Closed bwfrieds closed 9 years ago
Hi, I think that the main problem is that you are building it on Windows. I have had many issues with npm on Windows and one was the large paths of the node_modules folder. I don't know if it is solved yet because I'm developing in Ubuntu now.
Another thing I see in your logs is that python isn't in your path variables. I don't know if any package dependency needs it and if it will solve all your problems.
Regards.
2015-10-07 23:08 GMT+02:00 Ben Friedman notifications@github.com:
Julien Dubois suggested that I log this but it's probably not a bug because I know nothing about nodejs and npm. I followed the jhipster setup instructions so I think I installed everything needed. I did not get any errors when I installed yo, bower, grunt, and generator-jhipster. I cannot attach a text file to this bug in Chrome so I'll paste it all below. This is output from cygwin running as administrator. Thank you.
bfriedman@url-wtn323zayn8 /cygdrive/c/scm_repo/jhipster-demo/jhipster-sample-app $ mvn -v Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T10:29:23-07:00) Maven home: C:\bin\apache-maven-3.2.5 Java version: 1.8.0_45, vendor: Oracle Corporation Java home: C:\Program Files\Java\jdk1.8.0_45\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"
bfriedman@url-wtn323zayn8 /cygdrive/c/scm_repo/jhipster-demo/jhipster-sample-app $ mvn -Pprod clean package [INFO] Scanning for projects... [INFO]
[INFO]
[INFO] Building sampleApplication 0.0.1-SNAPSHOT
[INFO]
[INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ sampleapplication --- [INFO] Deleting C:\scm_repo\jhipster-demo\jhipster-sample-app\target [INFO] Deleting C:\scm_repo\jhipster-demo\jhipster-sample-app\node_modules (includes = [], excludes = []) [INFO] [INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-versions) @ sampleapplication --- [INFO] [INFO] --- jacoco-maven-plugin:0.7.4.201502262128:prepare-agent (pre-unit-tests) @ sampleapplication --- [INFO] surefireArgLine set to -javaagent:C:\Users\BFriedman.m2\repository\org\jacoco\org.jacoco.agent\0.7.4.201502262128\org.jacoco.agent-0.7.4.201502262128-runtime.jar=destfile=C:\scm_repo\jhipster-demo\jhipster-sample-app\target\test-results\coverage\jacoco\jacoco.exec [INFO] [INFO] --- maven-processor-plugin:2.2.4:process (process) @ sampleapplication --- [WARNING] diagnostic: warning: The following options were not recognized by any processor: '[mapstruct.defaultComponentModel, mapstruct.suppressGeneratorTimestamp]' [INFO] [INFO] --- yeoman-maven-plugin:0.4:build (run-frontend-build) @ sampleapplication --- [INFO] node version : v4.1.2 [INFO] npm version : 2.14.4 [INFO] -------------------------------------- [INFO] NPM INSTALL [INFO] -------------------------------------- npm WARN engine karma@0.12.35: wanted: {"node":">=0.8 <=0.12 || >=1 <=2"} (current: {"node":"4.1.2","npm":"2.14.4"}) npm WARN optional dep failed, continuing fsevents@1.0.2 npm WARN optional dep failed, continuing fsevents@1.0.2
spawn-sync@1.0.13 postinstall C:\scm_repo\jhipster-demo\jhipster-sample-app\node_modules\yo\node_modules\cross-spawn\node_modules\spawn-sync node postinstall
phantomjs@1.9.17 install C:\scm_repo\jhipster-demo\jhipster-sample-app\node_modules\phantomjs node install.js
Download already available at C:\cygwin\tmp\phantomjs\phantomjs-1.9.8-windows.zip Extracting zip contents Removing C:\scm_repo\jhipster-demo\jhipster-sample-app\node_modules\phantomjs\lib\phantom Copying extracted folder C:\cygwin\tmp\phantomjs\phantomjs-1.9.8-windows.zip-extract-1444250603742\phantomjs-1.9.8-windows -> C:\scm_repo\jhipster-demo\jhipster-sample-app\node_modules\phantomjs\lib\phantom Writing location.js file Done. Phantomjs binary available at C:\scm_repo\jhipster-demo\jhipster-sample-app\node_modules\phantomjs\lib\phantom\phantomjs.exe npm WARN optional dep failed, continuing imagemin-optipng@4.3.0 npm WARN optional dep failed, continuing imagemin-jpegtran@4.3.0 npm WARN optional dep failed, continuing imagemin-gifsicle@4.2.0
utf-8-validate@1.2.1 install C:\scm_repo\jhipster-demo\jhipster-sample-app\node_modules\browser-sync\node_modules\ socket.io\node_modules\engine.io \node_modules\ws\node_modules\utf-8-validate node-gyp rebuild
C:\scm_repo\jhipster-demo\jhipster-sample-app\node_modules\browser-sync\node_modules\ socket.io\node_modules\engine.io\node_modules\ws\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild ) gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. gyp ERR! stack at failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:116:14) gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:71:11 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\scm_repo\jhipster-demo\jhipster-sample-app\node_modules\browser-sync\node_modules\ socket.io\node_modules\engine.io \node_modules\ws\node_modules\utf-8-validate gyp ERR! node -v v4.1.2 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok
bufferutil@1.2.1 install C:\scm_repo\jhipster-demo\jhipster-sample-app\node_modules\browser-sync\node_modules\ socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil node-gyp rebuild
C:\scm_repo\jhipster-demo\jhipster-sample-app\node_modules\browser-sync\node_modules\ socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild ) gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. gyp ERR! stack at failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:116:14) gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:71:11 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\scm_repo\jhipster-demo\jhipster-sample-app\node_modules\browser-sync\node_modules\ socket.io\node_modules\engine.io\node_modules\ws\node_modules\bufferutil gyp ERR! node -v v4.1.2 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok npm WARN optional dep failed, continuing utf-8-validate@1.2.1
bufferutil@1.2.1 install C:\scm_repo\jhipster-demo\jhipster-sample-app\node_modules\browser-sync\node_modules\ socket.io \node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil node-gyp rebuild
C:\scm_repo\jhipster-demo\jhipster-sample-app\node_modules\browser-sync\node_modules\ socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild ) gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. gyp ERR! stack at failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:116:14) gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:71:11 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\scm_repo\jhipster-demo\jhipster-sample-app\node_modules\browser-sync\node_modules\ socket.io \node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\bufferutil gyp ERR! node -v v4.1.2 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok npm WARN optional dep failed, continuing bufferutil@1.2.1
utf-8-validate@1.2.1 install C:\scm_repo\jhipster-demo\jhipster-sample-app\node_modules\browser-sync\node_modules\ socket.io \node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate node-gyp rebuild
C:\scm_repo\jhipster-demo\jhipster-sample-app\node_modules\browser-sync\node_modules\ socket.io\node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild ) gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. gyp ERR! stack at failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:116:14) gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:71:11 gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\scm_repo\jhipster-demo\jhipster-sample-app\node_modules\browser-sync\node_modules\ socket.io \node_modules\socket.io-client\node_modules\engine.io-client\node_modules\ws\node_modules\utf-8-validate gyp ERR! node -v v4.1.2 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok npm WARN optional dep failed, continuing bufferutil@1.2.1 npm WARN optional dep failed, continuing utf-8-validate@1.2.1
ws@0.4.32 install C:\scm_repo\jhipster-demo\jhipster-sample-app\node_modules\karma\node_modules\ socket.io\node_modules\socket.io-client\node_modules\ws (node-gyp rebuild 2> builderror.log) || (exit 0)
C:\scm_repo\jhipster-demo\jhipster-sample-app\node_modules\karma\node_modules\ socket.io\node_modules\socket.io-client\node_modules\ws>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node rebuild )
spawn-sync@1.0.13 postinstall C:\scm_repo\jhipster-demo\jhipster-sample-app\node_modules\generator-jhipster\node_modules\yeoman-generator\node_modules\cross-spawn\node_modules\spawn-sync node postinstall
yo@1.4.6 postinstall C:\scm_repo\jhipster-demo\jhipster-sample-app\node_modules\generator-jhipster\node_modules\yo yodoctor
Yeoman Doctor Running sanity checks on your system
√ Global configuration file is valid √ NODE_PATH matches the npm root √ Node.js version √ No .bowerrc file in home directory √ No .yo-rc.json file in home directory √ npm version
Everything looks all right! npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" npm ERR! node v4.1.2 npm ERR! npm v2.14.4 npm ERR! path C:\Users\BFriedman\AppData\Roaming\npm-cache\is-finite\1.0.1\package\package.json.176f05758877bdd840ffb9d09726abbe npm ERR! code EPERM npm ERR! errno -4048 npm ERR! syscall rename
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\BFriedman\AppData\Roaming\npm-cache\is-finite\1.0.1\package\package.json.176f05758877bdd840ffb9d09726abbe' -> 'C:\Users\BFriedman\AppData\Roaming\npm-cache\is-finite\1.0.1\package\package.json' npm ERR! at Error (native) npm ERR! { [Error: EPERM: operation not permitted, rename 'C:\Users\BFriedman\AppData\Roaming\npm-cache\is-finite\1.0.1\package\package.json.176f05758877bdd840ffb9d09726abbe' -> 'C:\Users\BFriedman\AppData\Roaming\npm-cache\is-finite\1.0.1\package\package.json'] npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'rename', npm ERR! path: 'C:\Users\BFriedman\AppData\Roaming\npm-cache\is-finite\1.0.1\package\package.json.176f05758877bdd840ffb9d09726abbe', npm ERR! dest: 'C:\Users\BFriedman\AppData\Roaming\npm-cache\is-finite\1.0.1\package\package.json', npm ERR! parent: 'repeating' } npm ERR! npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request: npm ERR! C:\scm_repo\jhipster-demo\jhipster-sample-app\npm-debug.log
[INFO]
[INFO] BUILD FAILURE
[INFO]
[INFO] Total time: 12:17 min [INFO] Finished at: 2015-10-07T14:49:50-06:00 [INFO] Final Memory: 35M/440M
[INFO]
[ERROR] Failed to execute goal com.github.trecloux:yeoman-maven-plugin:0.4:build (run-frontend-build) on project sampleapplication: Error during : cmd /c npm install: Process exited with an error: -4048 (Exit value: -4048) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
bfriedman@url-wtn323zayn8 /cygdrive/c/scm_repo/jhipster-demo/jhipster-sample-app $
— Reply to this email directly or view it on GitHub https://github.com/jhipster/generator-jhipster/issues/2106.
+1 for Ubuntu over Windows for node but if you can't switch, here are few advices that could help.
On Windows, I don't recommend using node 4.x, there are still many issues with npm, node-sass, ... Try to install node 0.12.x.
Usually, it's a bad idea to run node as an admin, to avoid it don't install it under a folder that requires admin rights like c:\programs. Even better: use an nvm clone like nodist to install it.
As Ben said, you're missing Python in your PATH, make sure you install Python 2.7.x not 3.x, it is required by gyp which is used to build some native module.
Yes you have an issue with your Node installation: the Gyp issue is well-known, it's because of Python (like @gmarziou wrote), and then you have some permission issue. I don't know how it works on Windows, but the majority of our users are using Windows, so it's definitely working.
Julien Dubois suggested that I log this but it's probably not a bug because I know nothing about nodejs and npm. I followed the jhipster setup instructions so I think I installed everything needed. I did not get any errors when I installed yo, bower, grunt, and generator-jhipster. I cannot attach a text file to this bug in Chrome so I'll paste it all below. This is output from cygwin running as administrator. Thank you.