Error: Coming from `~/modules/static/index.js`

Please, fix it for me. I've done the whole project, was expecting to export it for Netlify Deployment.

We can’t fix it without access to ~modules/static/index.js!

You’re calling split on an array that is not yet defined, but other than that we can’t help without more information I’m afraid.

Thanks for replying, I’m using the default file given by prismic/@nuxt .

Curious.

According to the Nuxt docs, ({ route, path, html }) gets passed into the generate:page hook which is passed as page to the extractPayload() function, which is where the split that is throwing your error happens.

Which means that html should be defined. Could you try putting some console.log bits in relevant places in your ~modules/static/index.js and see what happens when you try to generate again?

Hi Aashir,

These extra modules have now been included by default as part of the latest Nuxt (V2.13), so there’s no need to include them here in the modules folder anymore.

Try updating to the latest Nuxt, then removed the files/folders and removed them module paths form your Nuxt config.

Hopefully this help’s and we’ll update the Nuxt samples this week.

Thanks.

1 Like

Have struggled a bit with this using the latest Nuxt until I read this thread.

The doc regarding Nuxt setup for Prismic should be updated.

Thanks! :slightly_smiling_face:

1 Like

Hi Stephane,

We've updated this!

Thanks.

1 Like

Closed as the documentation has been updated.