Identifier "readonly" has already been declared #12

Open
opened 2025-07-23 10:37:27 +02:00 by matthieumasse · 1 comment
matthieumasse commented 2025-07-23 10:37:27 +02:00 (Migrated from github.com)

Hi,

For information, we had to add a resolution to "@lezer/php": "1.0.3" because 1.0.4 causes build fails on our Vite application.

Use case :

  • We build a package (shared-components) with Vite (this package includes a codemirror component so we can reuse it in different apps)
  • We build an App (Nuxt3) importing the shared-components
  • ERROR on App build : Identifier "readonly" has already been declared

Resolution to 1.0.3 builds correctly.

Hi, For information, we had to add a resolution to "@lezer/php": "1.0.3" because 1.0.4 causes build fails on our Vite application. Use case : - We build a package (shared-components) with Vite (this package includes a codemirror component so we can reuse it in different apps) - We build an App (Nuxt3) importing the shared-components - ERROR on App build : Identifier "readonly" has already been declared Resolution to 1.0.3 builds correctly.
marijnh commented 2025-07-23 10:54:10 +02:00 (Migrated from github.com)

The module now defines readonly as a module-local binding. That is valid JavaScript and, since a module is in its own namespace, shouldn't interfere with any other variables. So this sounds like a bug in one of your build tools. Can you reduce the problem to the minimal build setup that produces it?

The module now defines `readonly` as a module-local binding. That is valid JavaScript and, since a module is in its own namespace, shouldn't interfere with any other variables. So this sounds like a bug in one of your build tools. Can you reduce the problem to the minimal build setup that produces it?
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lezer/php#12
No description provided.