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.

Unable to add custom tags in Next.js app on Windows

See original GitHub issue

What happened?

When running a new NextJS app on a Windows machine running Node v14.19.3 using the markdoc example, the app fails to load, throwing a failed to compile error:

image

After some tinkering - I found that by removing the tags, the app / page would finally render.

To reproduce

  • run npx create-next-app --example https://github.com/markdoc/markdoc-starter
  • run npm run dev
  • App will fail to load and show the error above.

Version

0.1.2

Additional context

I tried setting up the project on a M1 Mac running node v16.13.0 and the app was able to compile and render. So I’m wondering if this is related to the OS or possibly the node version.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:24 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
arranfcommented, Jun 20, 2022

@mfix-stripe Can we rename this issue to something that identifies this is Windows?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Window is not defined in Next.js React app - Stack Overflow
So we have to use back window object from the browser. if (typeof window !== "undefined") { // Client-side-only ...
Read more >
Advanced Features: Custom `Document` - Next.js
A custom Document can update the <html> and <body> tags used to render a Page. This file is only rendered on the server,...
Read more >
no-title-in-document-head - Next.js
Title tags should be defined at the page-level using next/head instead. ... Within a page or component, import and use next/head to define...
Read more >
Migrating from Create React App - Next.js
Learn how to transition an existing Create React App project to Next.js. ... For global styles, you'll need a custom _app.js to add...
Read more >
next/image - Next.js
A custom function used to resolve image URLs. A loader is a function returning a URL string for the image, given the following...
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