vue cli version is not showing - node.js

Am trying to run vue.js app for that I have installed vue cli by folliwng the official website("https://cli.vuejs.org/guide/installation.html"). When i execute any vue commands getting below error, I even cant able to check it's version. Is there anything i missied here?
Step1:- npm install -g #vue/cli
Sep2:- vue --version
The npm version is "6.2.0" and nodejs version is "v6.14.3".
andy#ip-172-16-198-195:~/vue/progressive-weather-app$ vue --version
/usr/lib/node_modules/#vue/cli/node_modules/open/index.js:16
const wslToWindowsPath = async path => {
^^^^
SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/lib/node_modules/#vue/cli/node_modules/#vue/cli-shared-utils/lib/openBrowser.js:9:14)

Vue CLI requires Node.js version 8.9 or above (8.11.0+ recommended).
You should update your nodejs version

Related

nodejs socket.io in ubuntu 18.04 error running server node app.js

I am trying hosting my first node.js socket.io server in ubuntu instance. I getting the error on running "node app.js"
/node_modules/ws/lib/websocket.js:345
...options
^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:53:10)`enter code here`
at Object.runInThisContext (vm.js:95:10)
at Module._compile (module.js:543:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
This error was caused due to installing an old version of Node.JS on your OS.
You can try updating to the LTS version. To find out what version your running you can run the command
node -v
Good Luck!

Error while executing Node registerAdmin.js Blockchain Tuna Fish App

I am trying to execute the tuna fish blockchain app, see below git example
https://github.com/hyperledger/education/tree/master/LFS171x/fabric-material/tuna-app
while running " node registerAdmin.js " I am getting following error
tuna-app/node_modules/fabric-client/lib/Client.js:746
async _createOrUpdateChannel(request, have_envelope) {
^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
npm and node version was quite old. I upgraded the version and error solved
use below command to upgrade NPM & node -
npm install -g npm#latest
npm install -g node
npm rebuild

Yeoman fails to run

I'm on centos 7 and I just installed nodejs version 6.14.3, npm version 3.10.10, and yo version 2.0.5. I then ran the command
yo code
In an attempt to use the yeoman generator to create a vscode extension. I then got the following error:
/usr/lib/node_modules/generator-code/generators/app/index.js:47
async prompting() {
^^^^^^^^^
SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object.get [as code:app] (/usr/lib/node_modules/yo/node_modules/yeoman-environment/lib/store.js:39:27)
Not sure if I'm just missing a silly dependency or something. Any ideas?
This node version, 6.X, doesn't support asyncs.
Definitely install a newer version, I recommend at least 8.X to not to risk other incompatibilities at the language level.

Firebase init throwing "Use of const in strict mode" error

I installed firebase tools using
sudo npm install -g firebase-tools
and everything seemed to install fine. I already had npm and node.js installed and these are the versions:
npm: 2.11.3
node: v0.12.7
But when I try running
firebase init
from my project file, I get this error
/usr/local/lib/node_modules/firebase-tools/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js:5
const Hoek = require('hoek');
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/usr/local/lib/node_modules/firebase-tools/node_modules/request/node_modules/hawk/lib/index.js:5:33)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
How can I fix this error?
This error is due to Node.js version, you need to update to version 8 or higher.

Error in angular2 cli installation

I am installing angular2 in linux with
sudo npm install -g #angular/cli
and after running that it successifully installs but after typing
ng new mynewapp
Am getting an error
/usr/local/lib/node_modules/#angular/cli/models/config/config.js:16
constructor(_configPath, schema, configJson, fallbacks = []) {
^
SyntaxError: Unexpected token =
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/usr/local/lib/node_modules/#angular/cli/models/config.js:3:18)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
what could be wrong
It's seem your nodejs version does not support ES2015, update your node to version 6+
you can using nvm to manage your node version
Your need Node version 6.x or higher
See documentation below
take a look here: https://github.com/angular/angular-cli/issues/4604

Resources