0

Why do I see this error in console in any new vue application I create: Uncaught SyntaxError: Unexpected identifier in main.js:1
It appears before I write any code. I didn't understand what is wrong in import statement. This is the original code I have:

import Vue from 'vue'
import App from './App.vue'

new Vue({
  el: '#app',
  render: h => h(App)
})

by the way, I use node v6.8.1

Tanaka
  • 78
  • 1
  • 8

2 Answers2

0

Well you need to run it they way it's explained in the article i provided as duplicate. The problem is the same, node does not yet support ES6 by default. (Import, Export is ES6 syntax)

0

I solved it.
I recreated my vue project using node v12.4.0

Tanaka
  • 78
  • 1
  • 8