Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vue-cli Vue init webpack template gives unexpected token error

Tags:

vue.js

vue-cli

I get the message

 vue-cli · Failed to download repo vuejs-templates/webpack: Unexpected token ...

When i attempt to create a new project

Im using Node version 6.12..3

Npm version 3.10.10

Vue cli version 2.9.2

like image 367
CALEB KPABITEY Avatar asked Mar 09 '26 20:03

CALEB KPABITEY


1 Answers

Update your node by installing the latest version 9.4.0 from their official site

Then update npm by running npm install npm@latest -g

Then run these commands again:

npm install vue

npm install --global vue-cli

vue init webpack my-project-name

Don't forget to change my-project-name to the name of your project.

I've just did that and it successfully created a new Vue project with Webpack

like image 147
Un1 Avatar answered Mar 12 '26 15:03

Un1