-
Notifications
You must be signed in to change notification settings - Fork 332
Open
Description
The build process fails when building the @embeddedchat/auth package due to Rollup not parsing the import assertion syntax in rollup.config.js.
Error Message
✖ @embeddedchat/auth:build
[!] SyntaxError: Unexpected identifier 'assert'
at compileSourceTextModule (node:internal/modules/esm/utils:344:16)
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:105:18)
at ModuleLoader.#translate (node:internal/modules/esm/loader:534:12)
at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:581:27)
at ModuleJob._link (node:internal/modules/esm/module_job:116:19)
Steps to Reproduce
- Clone the repository
- Install dependencies:
yarn - Run build:
yarn build - Build fails on
@embeddedchat/authpackage
Root Cause
The issue is in packages/auth/rollup.config.js line 4:
import packageJson from './package.json' assert { type: 'json' };Rollup's parser doesn't support the ESM import assertion syntax (assert { type: 'json' }) when processing the config file, even though Node.js supports it.
Affected Files
packages/auth/rollup.config.js(line 4)packages/api/rollup.config.js(line 3) - has the same issue
Environment
- Node.js Version: v22.16.0
- Package Manager: Yarn
- Build Tool: Rollup
- OS: macOS
Expected Behavior
The build should complete successfully for all packages.
Metadata
Metadata
Assignees
Labels
No labels
