Skip to main content

Command Palette

Search for a command to run...

Quick Solution for @libsql/hrana-client/LICENSE Syntax Error (Expected ';', '}' or <eof>) in Next.js 15

Published
2 min read
Quick Solution for @libsql/hrana-client/LICENSE Syntax Error (Expected ';', '}' or <eof>) in Next.js 15

Error message

> Build error occurred
Error: Turbopack build failed with 1 errors:
./node_modules/@libsql/hrana-client/LICENSE:1:5
Parsing ecmascript source code failed
> 1 | MIT License
    |     ^^^^^^^
  2 |
  3 | Copyright 2023 the sqld authors
  4 |
Expected ';', '}' or <eof>
    at ./node_modules/ (libsql/hrana-client/LICENSE:1:5)
Error: Command "npm run build" exited with 1

Such error was shown when pushing to Vercel and was not seen in development environtment.

Tech Stacks

TechsVersion
Next.js15.5.2 (with turbopack)
Node24.4.0
Biomejs2.2.0
Libsql/client0.15.15
Drizzle ORM0.44.5
VercelN/A

Solution

  1. Find your package.json file

  2. Find the following lines:

       "scripts": {
         "dev": "next dev --turbopack",
         "build": "next build --turbopack",
         "start": "next start",
         "lint": "biome check",
         "format": "biome format --write"
       },
    
  3. Remove the --turbopack from build command, so it becomes:

       "scripts": {
         "dev": "next dev --turbopack",
         "build": "next build", //LOOK HERE
         "start": "next start",
         "lint": "biome check",
         "format": "biome format --write"
       },
    

Notes

This error seems to affect Turbopack builds since removing --turbopack from the build script can resolve the build error. This error also mentioned here https://community.vercel.com/t/build-error-an-unexpected-error-happened-when-running-this-build/20836

Attempting to manually delete all the LICENSE and README files relating to hrana library from the Node Modules proven to not work for me. However, it may yields different result to other people as seen here https://github.com/vercel/next.js/issues/82881#issuecomment-3220603319

More from this blog

J

Justforvan Blog

7 posts

Hi, welcome to my blog! I usually posted anything tech related. My usual topics are JS, Flutter, or health-tech integration. But it can be about anything else!