moritzsternemann / vue-plausible

Plausible Analytics Vue.js Plugin and NuxtJS Module
MIT License
120 stars 8 forks source link

Cannot read properties of undefined (reading 'options') #24

Open joshistoast opened 1 year ago

joshistoast commented 1 year ago

Upon upgrading Nuxt 3 to the current stable build, getting an error.

 ERROR  Cannot read properties of undefined (reading 'options')                                                15:06:27

  at PlausibleModule (node_modules/.pnpm/vue-plausible@1.3.2/node_modules/vue-plausible/lib/cjs/nuxt-module.js:18:89)
  at installModule (node_modules/.pnpm/@nuxt+kit@3.0.0_rollup@2.79.1/node_modules/@nuxt/kit/dist/index.mjs:416:9)
  at async initNuxt (node_modules/.pnpm/nuxt@3.0.0_jbw4qtqtinc3kuqpq2aa3cjwz4/node_modules/nuxt/dist/index.mjs:1825:7)
  at async loadNuxt (node_modules/.pnpm/nuxt@3.0.0_jbw4qtqtinc3kuqpq2aa3cjwz4/node_modules/nuxt/dist/index.mjs:1857:5)
  at async loadNuxt (node_modules/.pnpm/@nuxt+kit@3.0.0-rc.13_rollup@2.79.1/node_modules/@nuxt/kit/dist/index.mjs:710:19)
  at async Object.invoke (node_modules/.pnpm/nuxi@3.0.0/node_modules/nuxi/dist/chunks/prepare.mjs:30:18)
  at async _main (node_modules/.pnpm/nuxi@3.0.0/node_modules/nuxi/dist/cli.mjs:50:20)
Nuxi 3.0.0                                                                                                     15:09:29
                                                                                                               15:09:29
RootDir: /Users/josh/Repositories/fnf-entries-app                                                              15:09:29
Nuxt project info: (copied to clipboard)                                                                       15:09:29

------------------------------
- Operating System: `Darwin`
- Node Version:     `v17.5.0`
- Nuxt Version:     `3.0.0`
- Nitro Version:    `1.0.0`
- Package Manager:  `pnpm@7.15.0`
- Builder:          `vite`
- User Config:      `modules`, `runtimeConfig`, `apollo`, `plausible`
- Runtime Modules:  `@nuxtjs/tailwindcss@6.1.3`, `nuxt-icon@0.1.7`, `@nuxtjs/apollo@5.0.0-alpha.3`, `vue-plausible@1.3.2`
- Build Modules:    `-`
------------------------------
blackspike commented 1 year ago

Yeah this is a showstopper bug for me upgrading to Nuxt 3.0 final

dimitrio-m commented 1 year ago

Hello.

Any solutions to this?

peterarends commented 1 year ago

For Nuxt3, https://github.com/nuxt-modules/plausible seems like a better option.