Reputation: 3
I am attempting to follow the official jhipster install instructions from http://jhipster.github.io/installation.html I am attempting to do the Docker install. I am using Linux Mint 17.1 and have installed docker (Docker version 1.0.1, build 990021a)
I have successfully pulled the docker container, run the container using the command provided, and ssh'd into the container.
However, when I attempt to run "yo jhipster" I run into issues. It prompts me with the standard generator questions then successfully creates all the files necessary for the project itself. Near the end of the generator, after a few of the npm installs, I end up getting an error message followed by an exception.
I'm unclear where this exception is coming from or what to do to resolve it. The official documentation doesn't mention anything about this issue, nor have I been able to locate any other reports of this exact issue.
I believe whatever is causing this exception also seems to cause issues when I try and launch the project. I use "mvn spring-boot:run" and the application appears to run, but when I try and access the webpage, I don't see any of the normal generated 'default' app I would expect. Instead, all I see is the title of the page as "jhipster" and the only text on the page itself "This is your footer"
Below is the output of the "yo jhipster" command (with some of the 'create' messages redacted for space)
jhipster@234b4f2192fd:/jhipster$ yo jhipster
_ _ ___ __ _____ ____ ___ __ _____ __ __ _
| |_| | | | |_) ( (` | | | |_ | |_) ( (` | | / /\ / /` | |_/
|_| | |_| |_| _)_) |_| |_|__ |_| \ _)_) |_| /_/--\ \_\_, |_| \
____ ___ ___
| |_ / / \ | |_)
|_| \_\_/ |_| \
_ __ _ __ ___ ____ _ __
| | / /\ \ \ / / /\ | | \ | |_ \ \ / ( (`
\_|_| /_/--\ \_\/ /_/--\ |_|_/ |_|__ \_\/ _)_)
Welcome to the JHipster Generator
This is an existing project, using the configuration from your .yo-rc.json file
to re-generate the project...
create package.json
create bower.json
create README.md
identical .bowerrc
identical .gitignore
identical .gitattributes
create Gruntfile.js
create pom.xml
..........
create src/main/webapp/assets/images/development_ribbon.png
create src/main/webapp/assets/images/hipster.png
create src/main/webapp/assets/images/hipster2x.png
create src/main/webapp/index.html
identical .editorconfig
identical .jshintrc
I'm all done. Running bower install & npm install for you to install the required dependencies. If this fails, try running the command yourself.
npm WARN engine [email protected]: wanted: {"node":">=0.10.0","npm":">=2.1.5"} (current: {"node":"0.10.33","npm":"1.4.28"})
npm WARN optional dep failed, continuing [email protected]
> [email protected] install /jhipster/node_modules/karma-phantomjs-launcher/node_modules/phantomjs
> node install.js
Download already available at /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2
Extracting tar contents (via spawned process)
Removing /jhipster/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2-extract-1425335692414/phantomjs-1.9.8-linux-x86_64 -> /jhipster/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom
Writing location.js file
Done. Phantomjs binary available at /jhipster/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/bin/phantomjs
> [email protected] install /jhipster/node_modules/grunt-browser-sync/node_modules/browser-sync/node_modules/socket.io/node_modules/engine.io/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
> [email protected] install /jhipster/node_modules/grunt-browser-sync/node_modules/browser-sync/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
> [email protected] install /jhipster/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
npm WARN optional dep failed, continuing [email protected]
npm WARN optional dep failed, continuing [email protected]
npm WARN optional dep failed, continuing [email protected]
npm WARN optional dep failed, continuing [email protected]
npm WARN prefer global [email protected] should be installed with -g
> [email protected] postinstall /jhipster/node_modules/yo
> yodoctor
Yeoman Doctor
Running sanity checks on your system
✔ No .bowerrc file in home directory
✔ Global configuration file is valid
✔ No .yo-rc.json file in home directory
✔ NODE_PATH matches the npm root
Everything looks all right!
npm ERR! EEXIST, open '/home/jhipster/.npm/ebc17495-r-npm-minimist-1-1-0-package-tgz.lock'
File exists: /home/jhipster/.npm/ebc17495-r-npm-minimist-1-1-0-package-tgz.lock
Move it away, and try again.
npm ERR! System Linux 3.13.0-37-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /jhipster
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! path /home/jhipster/.npm/ebc17495-r-npm-minimist-1-1-0-package-tgz.lock
npm ERR! code EEXIST
npm ERR! errno 47
npm ERR! not ok code 0
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:1001:11)
at Process.ChildProcess._handle.onexit (child_process.js:792:34)
jhipster@234b4f2192fd:/jhipster$
Upvotes: 0
Views: 1693
Reputation: 1805
This seems to be a bug with the JHipster Dockerfile. I submitted a pull request today in which the node version is updated. With an updated node version there is no problem anymore.
You have two options:
Download the Dockerfile from my forked repository and build the image yourself using the following command in the same directory as the Dockerfile
docker build -t yourusername/jhipster-docker .
sudo docker run -v ~/jhipster:/jhipster -p 8080:8080 -p 9000:9000 -p 35729:35729 -p 4022:22 -t yourusername/jhipster-docker
This docker run command was taken from the JHipster documentation page as you mentioned before.
Upvotes: 1
Reputation: 111
Have a look at these lines from the yo jhipster command
npm ERR! EEXIST, open '/home/jhipster/.npm/ebc17495-r-npm-minimist-1-1-0- package-tgz.lock'
File exists: /home/jhipster/.npm/ebc17495-r-npm-minimist-1-1-0-package-tgz.lock
Move it away, and try again.
So delete the .lock file and try again
Upvotes: 0