Closed mvdschee closed 4 years ago
Hey this seems like it might been an issue specific to your set up. If you can reach out to me on the chat window here https://prismic.io/dashboard/
I'll be happy to have a look at your project and investigate more.
Hi there, We are also experiencing this same issue. Our Nuxt site is available in 3 languages, but our blog is only available in one of them. Could this be the issue?
The error is reported in: modules/static/index.js:
let extractPayload = function({ html, route }, windowNamespace){
let chunks = html.split(``<script>window.${windowNamespace}=``)
let pre = chunks[0]
let payload = chunks[1].split('</script>').shift()
<== Cannot read property 'split' of undefined
let post = chunks[1].split('</script>').slice(1).join('</script>')
let path = route === '/' ? '' : route
This only happens when generating using target => static.
Any ideas about how to deal with this issue would be appreciated, thank you.
Hey @graux ,
I think the error is that the latest nuxt has the static module built in. So you can go ahead a delete the 'static' and 'crawler' files and this should stop the error.
I'll create an issue for us to update this example.
Yes, that is correct. Removing the static and crawler modules fixes the issue and the prismic integration works fine. The documentation and example project should be updated to reflect that because it is really confusing: https://prismic.io/docs/vuejs/getting-started/prismic-nuxt Thank you
New updates to this project remove these and solve the issue. The nuxt-link in the html resolver issue has also been resolved. Plus it's using the new full static implementation.
I have migrated to the new implementation for Nuxt, but when I'm running a
build
orgenerate
it fails with:logging
chunks[0]
will return an string:logging
chunks[1]
will returnundefined
Dependencies: