question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exception when running a Next.js project following the quick start and video

See original GitHub issue

Version

  • Prismic CLI version (know it by running prismic --version): 3.8.3-beta.0
  • Node: 15.4.0 -NPM: 7.0.15

Reproduction

  1. 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/
  2. Go to http://localhost:3000/test and get the expected “your SliceZone is empty” response, though without the styling shown in the video
  3. Following the video create a page with UID test
  4. Add a single CTA slice as in the video (but this happens with any slice for me)
  5. 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: Screen Shot 2020-12-10 at 2 02 43 PM

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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
hypervillaincommented, Dec 15, 2020

Thanks for reporting this, can you give a try to essential-slices@1.0.3-alpha.0?

1reaction
samlfaircommented, Dec 15, 2020

@hypervillain That worked for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced Features: Error Handling - Next.js
Handling Errors in Development​​ It is a modal that covers the webpage. It is only visible when the development server runs using next...
Read more >
The Next.js Handbook – Learn Next.js for Beginners
This is the recommended way to start a Next.js application, as it gives you structure and sample code to play with.
Read more >
6 reasons your Node.js apps are failing - IBM Developer
Problems occurring in Node.js application deployments can have a range of symptoms, but can generally be categorized into the following: Uncaught exception ......
Read more >
Create your first C# function in Azure using Visual Studio
In this quickstart, you learn how to use Visual Studio to create and publish a C# HTTP triggered function to Azure Functions.
Read more >
Testing and error handling patterns in Next.js - LogRocket Blog
One way to run tests on a Next.js application is through Cypress, ... Input the following command in the terminal to launch Cypress:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found