Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in beforeCreate hook: "SyntaxError: missing ) after argument list" #16

Open
LensHunnel opened this issue Feb 2, 2018 · 2 comments

Comments

@LensHunnel
Copy link

  1. vue init webpack test
  2. npm install nprogress
  3. edit main.js
import Vue from 'vue'
import NProgress from 'vue-nprogress'
import App from './App.vue'

Vue.use(NProgress)

const nprogress = new NProgress({ parent: '.nprogress-container' })

const app = new Vue({
  nprogress,
  ...App
})
app.$mount('#app')
  1. edit App.vue
<template>
  <nprogress-container></nprogress-container>
</template>

<script>
import NprogressContainer from 'vue-nprogress/src/NprogressContainer'

export default {
  components: {
    NprogressContainer
  }
}
</script>
  1. npm run dev
    works fine

  2. console shows:
    vue.esm.js?efeb:578 [Vue warn]: Error in beforeCreate hook: "SyntaxError: missing ) after argument list"
    found in
    ---> at node_modules/vue-nprogress/src/NprogressContainer.vue

@SamWoolerton
Copy link

SamWoolerton commented Feb 26, 2018

Just encountered this too. Interestingly, only happens when dev server has --hot flags for HMR, removing that prevents the error for me

@dizid
Copy link

dizid commented Mar 29, 2018

Same here: with --hot flag in webpack.dev.conf.js it produces that same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants