Reputation:
cs@cs-270E5J:~/JHipster$ yo jhipster
/usr/lib/node_modules/generator-jhipster/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)
cs@cs-270E5J:~/JHipster$
i installed jhipster without errors. only those:
npm WARN deprecated [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm
/usr/lib
└── [email protected]
when i go into jhipster folder and try to run jhipster with yo jhipster, it gives error in the s tart. Why? I have all update
i tried to update yeoman and errors:
npm ERR! Linux 4.2.0-35-generic
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "yo"
npm ERR! node v0.10.25
npm ERR! npm v3.8.7
npm ERR! path /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! Error: EACCES, access '/usr/lib/node_modules'
npm ERR! at module.exports (/usr/local/lib/node_modules/npm/lib/install/access-error.js:4:18)
npm ERR! at /usr/local/lib/node_modules/npm/lib/install/writable.js:30:25
npm ERR! at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:232:16
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! { [Error: EACCES, access '/usr/lib/node_modules'] code: 'EACCES', path: '/usr/lib/node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /home/caneraydin/npm-debug.log
Yeoman Doctor Running sanity checks on your system
✔ No .bowerrc file in home directory ✔ Global configuration file is valid ✔ NODE_PATH matches the npm root ✖ Node.js version
I also get errors. when i run sudo npm install -g npm but i have latest version of nodejs?
look:
caneraydin@caneraydin-270E5J:~$ sudo apt-get install -y nodejs Reading package lists... Done Building dependency tree
Reading state information... Done nodejs is already the newest version. The following packages were automatically installed and are no longer required: authbind libcommons-dbcp-java libcommons-pool-java libecj-java libgeronimo-jta-1.1-spec-java libntdb1 libtomcat7-java linux-headers-3.13.0-83 linux-headers-3.13.0-83-generic python-ntdb tomcat7-common Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded. caneraydin@caneraydin-270E5J:~$
Upvotes: 1
Views: 1298
Reputation:
sudo apt-get install curl For Node.js v4
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - sudo apt-get install -y nodejs Alternatively, for Node.js v5:
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash - sudo apt-get install -y nodejs
Upvotes: 0
Reputation: 16284
The doc recommends to use node LTS version, so 0.10.x is probably too old and does not support const keyword. I think the oldest version that could work is probably 0.12.x in case you can't upgrade to latest LTS.
Upvotes: 2