我已经分享了Jhipster的最后一个版本3.0。
那时我做了:sudo npm link
哟jhipster
并收到此错误:
/home/myUbuntu/dev/workspace/generator-jhipster-master/generators/app/index.js:15
const constants = require('../generator-constants'),
^^^^^
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object._storeAsPath.Object.defineProperty.get [as jhipster:app] (/usr/local/lib/node_modules/yo/node_modules/yeoman- environment/lib/store.js:40:23)
at Store.get (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/store.js:64:35)
at Environment.get (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:260:16)
at Environment.create (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:292:24)
一定有些事情我做错了,但我看不出是什么 如果有人有想法......
谢谢。我试图添加一个实体:
yo jhipster:实体车
并收到此错误:
events.js:154
throw er; // Unhandled 'error' event
^
TypeError: Cannot read property 'endsWith' of undefined
at Generator.getAngularAppName (/home/myUbuntu/dev/workspace/generator-jhipster-master/generators/generator-base.js:1223:67)
at module.exports.EntityGenerator.extend.initializing.getConfig (/home/myUbuntu/dev/workspace/generator-jhipster-master/generators/entity/index.js:116:40)
at Object.<anonymous> (/home/myUbuntu/dev/workspace/generator-jhipster-master/node_modules/yeoman-generator/lib/base.js:436:25)
at /home/myUbuntu/dev/workspace/generator-jhipster-master/node_modules/yeoman-generator/node_modules/run-async/index.js:24:25
at /home/myUbuntu/dev/workspace/generator-jhipster-master/node_modules/yeoman-generator/lib/base.js:448:8
at processImmediate [as _immediateCallback] (timers.js:383:17)
答案 0 :(得分:2)
您必须至少使用NodeJS 0.12.x.
答案 1 :(得分:0)
这对我有帮助!
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install -y nodejs