Skip to content

Commit

Permalink
Upgrade to node 22 to fix react-pdf
Browse files Browse the repository at this point in the history
As suggested here the react-pdf workers use functions that are not
availalbe on older node versions

elizaOS/eliza#76

Signed-off-by: Dinika Saxena <[email protected]>
  • Loading branch information
Dinika committed Nov 7, 2024
1 parent dfada44 commit 8821642
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.10.0
v22.11.0
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM timbru31/node-alpine-git:20 as builder
FROM timbru31/node-alpine-git:22 as builder

WORKDIR /tmp/nexus-web
COPY . /tmp/nexus-web
Expand All @@ -13,7 +13,7 @@ RUN apk add --no-cache \
RUN yarn
RUN NODE_OPTIONS=--max-old-space-size=8192 yarn build

FROM node:20-alpine
FROM node:22-alpine
ENV NODE_ENV=production
WORKDIR /opt/nexus
COPY --from=builder /tmp/nexus-web/dist /opt/nexus/dist
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/BlueBrain/nexus/issues/new?labels=fusion",
"type": "module",
"engine": {
"node": "20.10.0",
"node": "22.11.0",
"npm": ">=9.8.1",
"yarn": "1.22.x"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { vi } from 'vitest';
import { NexusProvider } from '@bbp/react-nexus';
import { createNexusClient } from '@bbp/nexus-sdk/es';
import { QueryClient, QueryClientProvider } from 'react-query';
Expand Down
4 changes: 2 additions & 2 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default defineConfig(() => {
console.log('⛔️ describe may not getting the latest tag')
}
}

return ({
base: process.env.NODE_ENV === 'production' ? "/__BASE__/" : "/",
plugins: [
Expand Down Expand Up @@ -88,7 +88,7 @@ export default defineConfig(() => {
output: {
manualChunks: {
lodash: ['lodash'],
pdfjs: ['node_modules/pdfjs-dist/build/pdf.worker.min.js'],
pdfjs: ['node_modules/pdfjs-dist/build/pdf.worker.min.mjs'],
codemirror: ["codemirror", "react-codemirror2"]
}
}
Expand Down

0 comments on commit 8821642

Please sign in to comment.