0

error I’m using the preline/preline library in my Next.js (TypeScript) project. I followed the installation and setup instructions provided in the documentation. However, I’m encountering a build error that prevents the project from compiling. Below is the error message:

Module parse failed: Unexpected token (8:8)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file.

Steps to Reproduce:

  1. Installed preline using npm
  2. Followed the configuration steps from the documentation.
  3. Ran the development server using npm run dev
Environment Details:
•   Next.js Version: 15.1.0
•   TypeScript: Enabled
•   Node.js Version: v20.15.1

PrelineScriot.tsx PrelineScriot.tsx

custom.d.ts custom.d.ts

layout.tsx layout.tsx

I tried to remedy the situation as follows my solution (not working)

1
  • Please do not add pictures of your code. We cannot copy it or modify it. Add your code as formatted text. Commented Dec 26, 2024 at 11:23

1 Answer 1

0

I fixed this and reverted the version from 2.0.6 to 2.0.3.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.