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.

Vue example: middlewares not a function error

See original GitHub issue

Hi, I’m experimenting building out a basic custom plugin which I am looking to add to the vue example. When I add even the most basic custom plugin (like the one in the docs that does nothing) I am getting the following error:

applyMiddleware.js?05f2:39 Uncaught TypeError: middleware is not a function at eval (applyMiddleware.js?05f2:39) at Array.map (<anonymous>) at eval (applyMiddleware.js?05f2:38) at <anonymous>:1:28399 at createStore (createStore.js?61ed:51) at analytics (analytics.browser.es.js?4747:3847) at eval (analytics.js?da7c:4) at Module../src/analytics.js (app.js:2662) at __webpack_require__ (app.js:726) at fn (app.js:101)

I’m guessing its some sort of dependency version problem(?) but would really appreciate any insight.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
DavidWellscommented, Mar 2, 2020

Oops yeah looks like demos need to be updated to latest https://github.com/DavidWells/analytics/blob/master/examples/vue/package.json#L14

0reactions
DavidWellscommented, Mar 2, 2020

NAMESPACE was changed to name. It sounds like that version of analytics needs to get updated to 0.3.0 in the demo

NAMESPACE and name both work (for backwards compatibility) but older analytics version won’t understand ‘name’

Read more comments on GitHub >

github_iconTop Results From Across the Web

"TypeError: next is not a function" in the router.js file of my vue ...
"TypeError: next is not a function" in the router.js file of my vue 3 project when trying to apply navigation guards? ; import...
Read more >
Koa2 support - next is not a function? · Issue #48 - GitHub
I'm trying to tweak this example to work with Koa2. https://github.com/kristianmandrup/vue-hackernews-2.0. However I get a strange error:.
Read more >
Understanding Vue middleware pipelines - LogRocket Blog
In this tutorial, we'll see how we can implement a middleware pipeline for a Vue app using Vue-Router.
Read more >
The context - Nuxt
The context provides additional objects/params from Nuxt to Vue components and is available in special nuxt lifecycle areas.
Read more >
Express multer middleware
Multer is a node.js middleware for handling multipart/form-data , which is primarily used for uploading files. It is written on top of busboy...
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