Nuxt generate failing with self is not defined in a vue dist file

1.3k Views Asked by At

I'm preparing to deploy my first Static app from a Nuxt.js 2 project.

While the static routes are generated fine, my dynamic routes are not. Once I remembered they were hidden in my dropdown menu - duhh - I created a /generate page which renders all my dynamic routes using the nuxt-link component. My assumption was that the crawler should find the /generate/index.vue page and thus the links on it, and crawl those.

It didn't.

Then I noticed a comment from Sebastien Chopin mentioning that SSR should be enabled when generating Static apps. Ok. So I re-enabled SSR and I've hit nothing but errors. A couple I've figured out but this latest one has got me stumped.

Self is not defined in vue dist file

Some googling has not revealed a clue that appeared relevant - or at least I didn't recognise them as relevant - so I need the 'worldwide developers' team help.

Does this error suggest there's an issue in Vue itself? I don't use 'self' anywhere in my app code soooo... hmmm?

Cheers, Jeremy

1

There are 1 best solutions below

0
On

Well it's generating now (has been for a few weeks, been a busy time!)... however the generated pages are not outputting with content, but I think that's a different issue.

My configuration currently is;

target: 'static',
ssr: false,
generate: {
    minify: false, // Nuxt 2.15.4 > Deprecated next major version > Use build.html.minify instead!
    routes: dynamicRoutes
}

I'll keep working on it.