Skip to content

Commit

Permalink
chore: fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
mutu committed Jul 30, 2024
1 parent afc6d15 commit 6d1b55f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Use Node.js 16
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 16 # semantic-release 需要 >= 16 的 Node.js 环境
node-version: 18 # semantic-release 需要 >= 16 的 Node.js 环境
cache: 'pnpm'

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
matrix:
node-version: [16]
node-version: [18]

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"engines": {
"node": "^16",
"pnpm": "^8"
"node": "^18",
"pnpm": "^8 || ^9"
},
"scripts": {
"preinstall": "npx only-allow pnpm",
Expand Down
6 changes: 4 additions & 2 deletions packages/gi-sdk-app/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export interface Project {
id: string;
name: string;
projectConfig: {};
config: {};
themes: {};
theme?: string;
};
Expand Down Expand Up @@ -53,8 +54,8 @@ const Studio: React.FunctionComponent<StudioProps> = props => {
service,
loadingText = '正在加载图应用...',
loadingComponent,
GISDKExtraParams,
componentExtraParams,
GISDKExtraParams = {},
componentExtraParams = {},
} = props;
const [state, setState] = React.useState({
isReady: false,
Expand Down Expand Up @@ -139,6 +140,7 @@ const Studio: React.FunctionComponent<StudioProps> = props => {
<ThemeComponent style={{ visibility: 'hidden', position: 'absolute' }} />
{/** @ts-ignore */}
<GISDK
// @ts-ignore
config={config}
assets={assets}
services={services}
Expand Down
4 changes: 2 additions & 2 deletions packages/gi-site/docker/website.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Website for graphinsight

##################################### Builder ####################################
from docker.io/library/node:16 AS builder
from docker.io/library/node:18 AS builder

COPY . /workspace/G6VP

Expand All @@ -28,7 +28,7 @@ RUN cd /workspace/G6VP/packages/gi-httpservice && rm -fr node_modules && npm ins


##################################### Runtime ####################################
from docker.io/library/node:16-alpine
from docker.io/library/node:18-alpine

COPY --from=builder /workspace/G6VP/packages/gi-httpservice /workspace/graphinsight
COPY --from=builder /workspace/G6VP/packages/gi-site/docker/docker-entrypoint.sh /workspace/docker-entrypoint.sh
Expand Down
2 changes: 1 addition & 1 deletion packages/gi-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
],
"main": "dist/app.js",
"scripts": {
"build:docker": "node scripts/link.mjs && cd ../../ && npm run clean && npm run build:all:es && npm run build:all:umd && cd packages/gi-site/ && BUILD_MODE=docker node scripts/pre-build.mjs && node scripts/copy-assets.mjs && BUILD_MODE=docker NODE_OPTIONS=--max_old_space_size=4096 umi build && node scripts/sync-to-httpservice.mjs",
"build:docker": "node scripts/link.mjs && cd ../../ && npm run clean && npm run build:all:es && npm run build:all:umd && cd packages/gi-site/ && BUILD_MODE=docker node scripts/pre-build.mjs && node scripts/copy-assets.mjs && BUILD_MODE=docker NODE_OPTIONS='--max_old_space_size=4096 --openssl-legacy-provider' umi build && node scripts/sync-to-httpservice.mjs",
"analyze": "ANALYZE=1 NODE_OPTIONS=--max_old_space_size=4096 umi build",
"build": "npm run prebuild && NODE_OPTIONS=--max_old_space_size=4096 umi build",
"deploy": "node ./scripts/deploy.js",
Expand Down

0 comments on commit 6d1b55f

Please sign in to comment.