{"action":"created","issue":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/4296","repository_url":"https://api.github.com/repos/jhipster/generator-jhipster","labels_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/4296/labels{/name}","comments_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/4296/comments","events_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/4296/events","html_url":"https://github.com/jhipster/generator-jhipster/issues/4296","id":181895743,"number":4296,"title":"jhipster:upgrade fails on the devbox","user":{"login":"cbornet","id":11633333,"avatar_url":"https://avatars.githubusercontent.com/u/11633333?v=3","gravatar_id":"","url":"https://api.github.com/users/cbornet","html_url":"https://github.com/cbornet","followers_url":"https://api.github.com/users/cbornet/followers","following_url":"https://api.github.com/users/cbornet/following{/other_user}","gists_url":"https://api.github.com/users/cbornet/gists{/gist_id}","starred_url":"https://api.github.com/users/cbornet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbornet/subscriptions","organizations_url":"https://api.github.com/users/cbornet/orgs","repos_url":"https://api.github.com/users/cbornet/repos","events_url":"https://api.github.com/users/cbornet/events{/privacy}","received_events_url":"https://api.github.com/users/cbornet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-09T16:20:30Z","updated_at":"2016-10-12T11:35:43Z","closed_at":null,"body":"<!--\r\n> Please follow the issue template below for bug reports and queries.\r\n> Bug reports or queries opened without any of these info will be **closed** without any explanation.\r\n> For feature requests, label the title with [FEATURE] and explain your use case and ideas clearly below, you can remove sections which are not relevant.\r\n> For bug reports your `.yo-rc.json` file is mandatory else we will close the issue.\r\n> You can run `yo jhipster:info` in your project folder to get most of the required info\r\n-->\r\n\r\n##### **Overview of the issue**\r\n\r\nWhen upgrading a jhipster app on the devbox. The process fails and the app isn't upgraded\r\n\r\n##### **Reproduce the error**\r\n\r\nDownload the 3.8.0 devbox or install manually with `sudo npm install -g generator-jhipster@3.8.0`\r\nGenerate an app (with `--skip-client` for quick generation)\r\nRun `yo jhipster:upgrade`\r\n\r\n##### **Suggest a Fix**\r\n\r\nSeveral issues there:\r\n1/ the default shell for the devbox is zsh and the command [rm -rf !(.yo-rc.json|.git)](https://github.com/jhipster/generator-jhipster/blob/master/generators/upgrade/index.js#L44) fails on this shell\r\n2/ the global npm folder is `/usr/lib/modules` and needs root permissions for writing so the installation of the new version fails.\r\n\r\nThe workarounds are:\r\n* change to bash shell before launching the upgrade (but most of the time, I forget and I lose a lot of time...)\r\n* in the devbox, change ownership of /usr/lib/node_modules to vagrant (not sure it is secure)\r\n\r\nWouldn't it be better to install the new version locally ? I think there are a lot of reasons that could make the global install fail.\r\n\r\n##### **JHipster Version(s)**\r\n\r\n3.8.0/3.9.0\r\n\r\n##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**\r\n```json\r\n{\r\n  \"generator-jhipster\": {\r\n    \"jhipsterVersion\": \"3.8.0\",\r\n    \"baseName\": \"standard\",\r\n    \"packageName\": \"com.mycompany.myapp\",\r\n    \"packageFolder\": \"com/mycompany/myapp\",\r\n    \"serverPort\": \"8080\",\r\n    \"authenticationType\": \"session\",\r\n    \"hibernateCache\": \"ehcache\",\r\n    \"clusteredHttpSession\": false,\r\n    \"websocket\": false,\r\n    \"databaseType\": \"sql\",\r\n    \"devDatabaseType\": \"h2Memory\",\r\n    \"prodDatabaseType\": \"postgresql\",\r\n    \"searchEngine\": false,\r\n    \"messageBroker\": false,\r\n    \"buildTool\": \"maven\",\r\n    \"enableSocialSignIn\": false,\r\n    \"rememberMeKey\": \"47b4e760a1684605304b6a03d26cc6f2496a0914\",\r\n    \"useSass\": false,\r\n    \"applicationType\": \"monolith\",\r\n    \"testFrameworks\": [],\r\n    \"jhiPrefix\": \"jhi\",\r\n    \"enableTranslation\": true,\r\n    \"nativeLanguage\": \"en\",\r\n    \"languages\": [\r\n      \"en\"\r\n    ],\r\n    \"serviceDiscoveryType\": false,\r\n    \"skipClient\": true\r\n  }\r\n}\r\n```\r\n##### **Browsers and Operating System**\r\n\r\nDevbox : ubuntu 16 amd64"},"comment":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/comments/253189614","html_url":"https://github.com/jhipster/generator-jhipster/issues/4296#issuecomment-253189614","issue_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/4296","id":253189614,"user":{"login":"ashakhov","id":15815207,"avatar_url":"https://avatars.githubusercontent.com/u/15815207?v=3","gravatar_id":"","url":"https://api.github.com/users/ashakhov","html_url":"https://github.com/ashakhov","followers_url":"https://api.github.com/users/ashakhov/followers","following_url":"https://api.github.com/users/ashakhov/following{/other_user}","gists_url":"https://api.github.com/users/ashakhov/gists{/gist_id}","starred_url":"https://api.github.com/users/ashakhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashakhov/subscriptions","organizations_url":"https://api.github.com/users/ashakhov/orgs","repos_url":"https://api.github.com/users/ashakhov/repos","events_url":"https://api.github.com/users/ashakhov/events{/privacy}","received_events_url":"https://api.github.com/users/ashakhov/received_events","type":"User","site_admin":false},"created_at":"2016-10-12T11:35:43Z","updated_at":"2016-10-12T11:35:43Z","body":"BTW, there already was a [related issue](https://github.com/jhipster/generator-jhipster/issues/4033)."}}
{"actor":{"display_login":"ashakhov"}}