hooper: Error when used in production with Nuxt.js
Describe the bug I’m working with Nuxt.
package.json version: “nuxt”: “^2.0.0”
In development mode it’s working fine. It’s configured with 3 items and navigation arrows visible with some breakpoints, all good.
But when I make the build (npm run generate
or npm run start
) for production the website crashes and slider is not working anymore.
Slider is not working and it’s showing 2 only because the javascript error. Images are missing, and slider items width/height is wrong. Navigation arrows are broken too.
Error message:
Uncaught (in promise) TypeError: Cannot assign to read only property 'message' of object ''
at 94653d717eea14401790.js:1
To Reproduce Steps to reproduce the behavior:
npm run generate
with nuxt- Open generated page in
/dist
- See error
Expected behavior Render the slider fully functional with 3 images by default and the navigation arrows working.
Screenshots
Desktop (please complete the following information):
- Node: Tested with
v8
,v10
andv11
- OS: OSX
- Browser: Chrome
- Version: 72.0.3626.109 (Build oficial) (64 bits)
Additional context Add any other context about the problem here.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 21 (6 by maintainers)
Hi,
I have using Hooper over Nuxt.js and hosting on a static server with
npm run generate
and local development withnpm run dev
and here I have never seen this error dispatched.Anyway, the error say that an read only property
message
not be setted, and the Hooper code not have anyone reference to this propertymessage
… @baumannzone maybe be an problem in your side code.Hugs,
We are not scared but it has nothing to do with my code dude. So that won’t help you.
I figured it out. You just have to clear cache and local storage. It has to do with the auth module.
I have the exact same error on Netlify. Any solution to this?
Hi,
I guess that error is more vinculated to Nuxt.js instead Hooper.
So, I forked your project and clicking on console error (and using Chrome Dev to unminimize) I see that:
Searching on web I found a lot of recent issues to same version of Nuxt.js, and one of that was marked with
cmty:bug-report
:https://github.com/nuxt/nuxt.js/issues/5056
So, maybe you can post your issue there too.
*the issued version and of my personal project is the same:
"nuxt": "^2.4.3"
, but usingnpm run generate
ornpm run dev
withmode:spa
on nuxt.config.js, this error don’t dispatch to me.Hugs,