Fix node22 lightningcss workaround (#231)

* Latest npm in @colanode/web Docker, add optional plat/arch dependencies

There are a number of issues with lightningcss and node 22/npm.
This is related to platform-/architecture-specific packages.
This uses a number of pieces from multiple solutions found in the notes
 for #160.

This addresses the issues by the following measures:
- Make sure npm is up-to-date in the @colanode/web Docker build
- Add optional dependencies for all the platform-specific lightningcss
  packages that are most likely to be used in the project (HSF and
  mainline) in the npm project modules that require them:
  - @colanode/desktop
  - @colanode/web
  - @colanode/ui

Closes #159.

* Fix darwin-arm64 version.

* Remove unnecessary optional dependencies; remove duplicate version property

* Fix merge issue where the version field got deleted.

* Move the version field back to where it was before.
This commit is contained in:
Jonathan Hyry
2025-11-04 05:47:30 -08:00
committed by GitHub
parent 9fb4467d56
commit 316a388d4a
3 changed files with 15 additions and 1 deletions

View File

@@ -19,7 +19,7 @@ COPY ../../packages/ui/package.json packages/ui/package.json
COPY ../../apps/web/package.json apps/web/package.json
# Install dependencies
RUN npm ci
RUN npm i -g npm@latest && npm ci
# Copy source files
COPY ../../packages/core packages/core

7
package-lock.json generated
View File

@@ -27284,6 +27284,13 @@
"@types/react-dom": "^19.2.2",
"tailwindcss": "^4.1.13",
"tw-animate-css": "^1.4.0"
},
"optionalDependencies": {
"lightningcss-darwin-arm64": "^1.30.1",
"lightningcss-darwin-x64": "^1.30.1",
"lightningcss-linux-x64-gnu": "^1.30.1",
"lightningcss-linux-x64-musl": "^1.30.1",
"lightningcss-win32-x64-msvc": "^1.30.1"
}
},
"scripts": {

View File

@@ -85,5 +85,12 @@
"tiptap-extension-auto-joiner": "^0.1.3",
"ts-pattern": "^5.8.0",
"zod": "^4.1.12"
},
"optionalDependencies": {
"lightningcss-darwin-arm64": "^1.30.1",
"lightningcss-darwin-x64": "^1.30.1",
"lightningcss-linux-x64-gnu": "^1.30.1",
"lightningcss-linux-x64-musl": "^1.30.1",
"lightningcss-win32-x64-msvc": "^1.30.1"
}
}