Skip to content

Commit

Permalink
ui: Fix github run pipeline for node > 16
Browse files Browse the repository at this point in the history
node-gyp: explicitly set node-gyp to 9.3.0 (latest) in package.json
node-sass: using node-sass is deprecated and named sass now.

Node v18 support:

added --openssl-legacy-provider as workaround for node v18 due to breaking change in the SSL encryption used in webpack
see: webpack/webpack#14532
consider upgrading all SSL related packages in the future
  • Loading branch information
scpa1055 authored and cassava committed Nov 11, 2022
1 parent 16ed61b commit d36cddb
Show file tree
Hide file tree
Showing 3 changed files with 4,367 additions and 5,006 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/build-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,21 @@ jobs:
working-directory: ./ui
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: yarn
cache-dependency-path: ui/yarn.lock
- run: yarn install
- run: yarn run build
- name: Setup yarn and install
run: npm install -g yarn && yarn install
- name: Run Build ${{ matrix.node }}
run: |
read version _ <<< $(node --version)
echo $version
if [[ $version == "v18"* ]]; then
npm run build_v18
else
npm run build
fi
shell: bash

4 changes: 3 additions & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"jsonpath": "^1.0.2",
"less": "^3.9.0",
"mathjs": "^7.5.1",
"node-sass": "^4.14.0",
"node-gyp": "9.3.0",
"sass": "^1.56.1",
"plotly.js": "^2.2.1",
"randomcolor": "^0.5.4",
"react": "^16.8.6",
Expand All @@ -37,6 +38,7 @@
"scripts": {
"start": "react-app-rewired start",
"build": "react-app-rewired build",
"build_v18": "react-app-rewired --openssl-legacy-provider build",
"test": "react-scripts test --env=jsdom"
},
"description": "Web-based user interface for cloe",
Expand Down
Loading

0 comments on commit d36cddb

Please sign in to comment.