guruahn / vue-google-oauth2

🔌 Handling Google sign-in and sign-out for Vue.js applications
MIT License
183 stars 55 forks source link

Adding this module to new nuxt project causes "export" error #63

Closed bulldoguk closed 3 years ago

bulldoguk commented 3 years ago

Describe the bug I started a fresh Nuxt project - this project runs on my local machine with no issues. I followed your instructions to add this library as a Nuxt plugin - it compiles with no linting or compilation errors, but all I get in my browser is "Unexpected token 'export'"

To Reproduce Steps to reproduce the behavior:

  1. Create a fresh Nuxt project using npx create-nuxt-app googleauth
  2. Confirm everything works on your local machine
  3. Add this library with npm install
  4. Create the plugin file as per instructions
  5. Add the plugin to nuxt.config.js as per instructions

Expected behavior To work and be available to develop with

Desktop (please complete the following information):

kuzroman commented 3 years ago

have the same error/ try fix it like this in nuxt.config.js plugins: [ {src: '~/plugins/vue-google-oauth2.js', ssr: false}, ],