https://codesandbox.io/s/vy6863v787
The method should run
Not running
It's working fine when using Vue directly.
You are not getting error event probably because returned content is an actual image (even though response is 404):
content-length: 43
content-type: image/gif
And it's probably related to feature mentioned in #5483 (serve-placeholder)
As @rchl says this behavior cause by the server-placeholder.
First i comment out the code and start my local nuxt.js cli , the error event will be fire .
And then i cancel comment out the code, add { dist: {}, static: { skipUnknown: true } } to my nuxt.config.js, the error event will be fire too.
{ dist: {}, static: { handlers: null } } should work as described in https://github.com/nuxt/serve-placeholder
Right! It worked after generating static html. I'm not using server on production, so need to set that flag on dev mode. Thanks all.
// nuxt.config.js
{
//...
render: {
fallback: false
}
//...
}
it works for me.
// nuxt.config.js { //... render: { fallback: false } //... }it works for me.
None of these suggestions have worked for me. Is there anything else I can do?
Most helpful comment
You are not getting error event probably because returned content is an actual image (even though response is 404):
And it's probably related to feature mentioned in #5483 (serve-placeholder)