tailwindlabs / tailwindui-issues

A place to report bugs discovered in Tailwind UI.
237 stars 4 forks source link

Syntax template - Unable to build #1646

Closed Fyroeo closed 2 weeks ago

Fyroeo commented 2 weeks ago

What component (if applicable)

Describe the bug It is currently impossible to build the Syntax template using the downloaded sources. The build fails with the following error :

Failed to compile.

./src/components/Layout.tsx + 10 modules
Unexpected end of JSON input

./node_modules/@headlessui/react/dist/components/listbox/listbox.js + 34 modules
Unexpected end of JSON input

./src/markdoc/search.mjs + 1 modules
Unexpected end of JSON input

> Build failed because of webpack errors

But, the project works in the dev environment (npm run dev/yarn dev)

To Reproduce Steps to reproduce the behavior:

  1. Download the template
  2. Install the dependencies (npm install / yarn install)
  3. Try to make a build (npm run build / yarn build)

The build will fail.

Expected behavior The project should be built.

Screenshots

Browser/Device (if applicable)

Additional context Add any other context about the problem here.

reinink commented 2 weeks ago

Hey! I've just tested this by downloading the latest version of this template from the Tailwind UI website and running npm install and npm run build on both node 18 and node 20, and both work correctly. What version of node are you using?

image
Fyroeo commented 2 weeks ago

Hey! The node version was indeed the culprit; I didn't think about this before making the issue. I was using the current version instead of the LTS. My bad! Therefore, it works on the 22 LTS but not on 23.2.0 (current).

Sorry for wasting your time 🙁

reinink commented 2 weeks ago

@Fyroeo all good! Glad we got it figured out 👍