Closed ashakhov closed 8 years ago
Looks like you don't have the right permissions, have you tried:
https://docs.npmjs.com/getting-started/fixing-npm-permissions
Yes, it worked with npm global folder moved from /usr/lib/node_modules to home folder. It doesn't look like the best solution since it locks system-wide libs to single user but it's more like a npm architecture issue that can not be overridden in JH. Maybe it will be better to note it on the JHipster Installation page?
But it's not a %distribname%-way since every Linux distro has its own package manager that was meant to be used! :) Sorry, now it's more like a religious dispute. Seems like this issue can be closed since everyone can google this problem and find an answer in these comments.
@miguelk5 please don´t comment on old closed issues. You may have encountered an issue that looks similar but 7 years later, it does not make sense. Please open a new issues with all requested details.
Overview of the issue
During project upgrade JHipster is trying to update itself. System-wide installation of NodeJS keeps all its modules in /usr/lib/node_modules/ and you can install something globally only as root or via sudo. So the upgrader fails to write its files and finish its job. Tried to upgrade JH before executing project upgrade. It succeeded to make a commit but then tried to install actual version of JH and failed. sudo yo jhipster:upgrade failed as well.
Reproduce the error
JHipster Version(s)
JHipster 3.6.1 (trying to update project generated by 3.5.1)
git version 1.9.1 node: v4.5.0 npm: 3.10.6 bower: 1.7.9 gulp: [12:44:09] CLI version 3.9.1 [12:44:09] Local version 3.9.1 yeoman: 1.8.4
Browsers and Operating System
Ubuntu 14.04.5, regular non-root user with sudo rights, system-wide installed nodejs from official NodeJS repo.