jhipster V3.0:更新失败

时间:2016-03-24 08:15:31

标签: jhipster

当我运行npm update -g generator-jhipster时 在我的Jhipster 2.27.2应用程序文件夹中,我收到此错误:

npm ERR! Linux 4.2.0-30-generic
npm ERR! argv "/usr/local/bin/node" "/usr/bin/npm" "update" "-g" "generator-jhipster"
npm ERR! node v5.6.0
npm ERR! npm  v3.8.1
npm ERR! code EMISSINGARG

npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror     at module.exports (/usr/lib/node_modules/npm/lib/install/mutate-into-logical-tree.js:12:3)
npm ERR! typeerror     at /usr/lib/node_modules/npm/lib/outdated.js:78:5
npm ERR! typeerror     at /usr/lib/node_modules/npm/lib/outdated.js:62:20
npm ERR! typeerror     at /usr/lib/node_modules/npm/node_modules/read-package-tree/rpt.js:186:9
npm ERR! typeerror     at f (/usr/lib/node_modules/npm/node_modules/once/once.js:17:25)
npm ERR! typeerror     at /usr/lib/node_modules/npm/node_modules/read-package-tree/rpt.js:152:20
npm ERR! typeerror     at f (/usr/lib/node_modules/npm/node_modules/once/once.js:17:25)
npm ERR! typeerror     at then (/usr/lib/node_modules/npm/node_modules/read-package-tree/rpt.js:121:22)
npm ERR! typeerror     at /usr/lib/node_modules/npm/node_modules/read-package-tree/rpt.js:81:20
npm ERR! typeerror     at fs.js:1653:23
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror     <http://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /home/myUbuntu/dev/workspace/npm-debug.log

更新前是否需要配置?

[更新]

通过将node.js更新为

来解决
node v5.6.0
npm  v3.8.1

但现在我遇到了这个问题

50112 error Linux 4.2.0-30-generic
50113 error argv "/usr/bin/nodejs" "/usr/bin/npm" "update" "-g" "generator-jhipster"
50114 error node v5.9.0
50115 error npm  v3.7.3
50116 error path /usr/lib/node_modules/generator-jhipster/node_modules/yo/node_modules/yeoman-doctor/node_modules/bin-version-check/node_modules/.bin/semver
50117 error code EACCES
50118 error errno -13
50119 error syscall unlink
50120 error Error: EACCES: permission denied, unlink '/usr/lib/node_modules/generator-jhipster/node_modules/yo/node_modules/yeoman-doctor/node_modules/bin-version-check/node_modules/.bin/semver'
50120 error     at Error (native)
50120 error  { [Error: EACCES: permission denied, unlink '/usr/lib/node_modules/generator-jhipster/node_modules/yo/node_modules/yeoman-doctor/node_modules/bin-version-check/node_modules/.bin/semver']
50120 error   errno: -13,
50120 error   code: 'EACCES',
50120 error   syscall: 'unlink',
50120 error   path: '/usr/lib/node_modules/generator-jhipster/node_modules/yo/node_modules/yeoman-doctor/node_modules/bin-version-check/node_modules/.bin/semver',
50120 error   parent: 'bin-version-check' }
50121 error Please try running this command again as root/Administrator.

我使用sudo测试但是使用sudo我再次遇到第一个问题。

1 个答案:

答案 0 :(得分:1)

如果您想将generator-jhipster软件包从Wanted更改为最新版本:

$ npm outdated -g
Package             Current  Wanted  Latest  Location
generator-jhipster   2.27.2  2.27.2   3.2.0

运行此命令

$ npm install -g generator-jhipster