question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unexpected token <

See original GitHub issue

app.js

import Vue from 'vue'
import BootstrapVue from 'bootstrap-vue';
import Icon from 'vue-awesome/components/Icon.vue'

import  { event } from './utils'
import store from './store'

Vue.use(BootstrapVue);
Vue.component('icon', Icon);

const app = new Vue({
  el: '#app',
  store,
  render: h => h(require('./main.vue')),
  created () {
    event.init()
  }
})

export { app, store }

“brunch”: “2.7.4” “vue”: “2.1.8”

screenshot from 2017-01-04 07-18-38

Has anyone encountered this problem?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
antonioreynacommented, Feb 8, 2017

im getting this:

dist/app.0dc74645fc9cf0f68122.js from UglifyJs
SyntaxError: Unexpected token: name (warn) [./~/vue-awesome/util.js:3,0][dist/app.0dc74645fc9cf0f68122.js:607,4]
1reaction
HADBcommented, Feb 13, 2017

@Justineo This works for me:

exclude: /node_modules(?![\\/][\S]*vue-awesome[\\/])/

The real path for vue-awesome in node_modules is .2.1.0@vue-awesome not vue-awesome

BTW, is the file “util.js” necessary?

Read more comments on GitHub >

github_iconTop Results From Across the Web

syntax error: unexpected token - javascript - Stack Overflow
The error SyntaxError: Unexpected token < likely means the API endpoint didn't return JSON in its document body, such as due to a...
Read more >
Have a JavaScript Unexpected Token Error? Check Your Syntax
The JavaScript's parser expects tokens and symbols in a particular order, with relevant values or variables in between. Often, an Unexpected ...
Read more >
JavaScript Error Handling: Unexpected Token - GeeksforGeeks
Not follow them throws an error.An unexpected token occurs if JavaScript code has a missing or extra character { like, ) + –...
Read more >
Syntax Error: Unexpected Token '<' - Codecademy
I don't understand what's wrong with my code. Whenever I run it, this pops up: syntax error: unexpected token '<'. Someone please help!...
Read more >
Unexpected token - Common causes and quick fixes - Opster
Unexpected token – How to solve this Elasticsearch error. Opster Team. July-20, Version: 1.7-8.0. Before you ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found