Skip to content

Commit cd503df

Browse files
authored
Merge pull request #546 from nscuro/add-node-options-to-npm-scripts
Ensure `--openssl-legacy-provider` is set for all NPM scripts
2 parents a85cbcd + 58f2f0f commit cd503df

File tree

4 files changed

+134
-18
lines changed

4 files changed

+134
-18
lines changed

.github/workflows/_meta-build.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ jobs:
4949
- name: Run Npm Build
5050
env:
5151
CI: true
52-
NODE_OPTIONS: --openssl-legacy-provider
53-
5452
run: |-
5553
npm ci
5654
npm run build --if-present

README.md

-13
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,6 @@ The Docker container includes NGINX and a pre-deployed Front-End release.
4444

4545
## Build Setup
4646

47-
Webpack 4 has an [issue with nodejs 17 and higher](https://github.com/webpack/webpack/issues/14532) resulting in: `Error: error:0308010C:digital envelope routines::unsupported`. As a workaround you'll need to set the following NODE_OPTIONS on Linux:
48-
49-
``` bash
50-
export NODE_OPTIONS=--openssl-legacy-provider
51-
```
52-
53-
Or on Windows:
54-
``` bash
55-
set NODE_OPTIONS=--openssl-legacy-provider
56-
```
57-
58-
After that you can run:
59-
6047
``` bash
6148
# Install dependencies
6249
npm install

package-lock.json

+130
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
},
1313
"scripts": {
1414
"start": "npm run serve",
15-
"serve": "npm run prebuild && vue-cli-service serve",
16-
"prebuild": "node update-embedded-version.js",
17-
"build": "npm run prebuild && vue-cli-service build",
15+
"serve": "npm run prebuild && cross-env NODE_OPTIONS=--openssl-legacy-provider vue-cli-service serve",
16+
"prebuild": "cross-env NODE_OPTIONS=--openssl-legacy-provider node update-embedded-version.js",
17+
"build": "npm run prebuild && cross-env NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build",
1818
"lint": "vue-cli-service lint"
1919
},
2020
"dependencies": {
@@ -69,6 +69,7 @@
6969
"@vue/cli-service": "3.12.1",
7070
"babel-core": "7.0.0-bridge.0",
7171
"copy-webpack-plugin": "5.1.2",
72+
"cross-env": "^7.0.3",
7273
"growl": "1.10.5",
7374
"https-proxy-agent": "2.2.4",
7475
"sass": "1.49.7",

0 commit comments

Comments
 (0)