Exception when running a Next.js project following the quick start and video
See original GitHub issueVersion
- Prismic CLI version (know it by running
prismic --version
): 3.8.3-beta.0 - Node: 15.4.0 -NPM: 7.0.15
Reproduction
- Follow the quick start to set up including making a new Next.js project and a new repo: https://www.slicemachine.dev/documentation/next/nextjs-quick-start/
- Go to http://localhost:3000/test and get the expected “your SliceZone is empty” response, though without the styling shown in the video
- Following the video create a page with UID test
- Add a single CTA slice as in the video (but this happens with any slice for me)
- Refresh http://localhost:3000/test
What is expected?
I should see a CTA slice rendered in the browser.
What is actually happening?
An exception is thrown. Here is the CLI output:
ReferenceError: h is not defined at N (webpack-internal:///./node_modules/essential-slices/dist/index.js:1303:3) at processChild (/Users/jware/Documents/work/exavault/synced_source/marketing-website/node_modules/react-dom/cjs/react-dom-server.node.development.js:3353:14) at resolve (/Users/jware/Documents/work/exavault/synced_source/marketing-website/node_modules/react-dom/cjs/react-dom-server.node.development.js:3270:5) at ReactDOMServerRenderer.render (/Users/jware/Documents/work/exavault/synced_source/marketing-website/node_modules/react-dom/cjs/react-dom-server.node.development.js:3753:22) at ReactDOMServerRenderer.read (/Users/jware/Documents/work/exavault/synced_source/marketing-website/node_modules/react-dom/cjs/react-dom-server.node.development.js:3690:29) at renderToString (/Users/jware/Documents/work/exavault/synced_source/marketing-website/node_modules/react-dom/cjs/react-dom-server.node.development.js:4298:27) at Object.renderPage (/Users/jware/Documents/work/exavault/synced_source/marketing-website/node_modules/next/dist/next-server/server/render.js:53:851) at Function.getInitialProps (webpack-internal:///./node_modules/next/dist/pages/_document.js:135:19) at Function.getInitialProps (webpack-internal:///./pages/_document.js:24:85) at loadGetInitialProps (/Users/jware/Documents/work/exavault/synced_source/marketing-website/node_modules/next/dist/next-server/lib/utils.js:5:101)
And the browser:
Any additional information
I’ve tried uninstalling and reinstalling prismic-cli, starting projects and Prismic repositories from scratch, upgrading Node, and using different components. If I run through the same process using Nuxt, everything works fine.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top GitHub Comments
Thanks for reporting this, can you give a try to essential-slices@1.0.3-alpha.0?
@hypervillain That worked for me.