Skip to content

Commit 0fa82a5

Browse files
authoredJul 17, 2024··
fix: Parse Server installation fails due to post install script incorrectly parsing required min. Node version (#9216)
1 parent 5fa58fe commit 0fa82a5

File tree

3 files changed

+40
-52
lines changed

3 files changed

+40
-52
lines changed
 

‎package-lock.json

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

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
"madge:circular": "node_modules/.bin/madge ./src --circular"
140140
},
141141
"engines": {
142-
"node": "18 || 19 || 20 || 22"
142+
"node": ">=18.0.0 <19.0.0 || >=19.0.0 <20.0.0 || >=20.0.0 <21.0.0 || >=22.0.0 <23.0.0"
143143
},
144144
"bin": {
145145
"parse-server": "bin/parse-server"

‎postinstall.js

+38-50
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,38 @@
1-
const pkg = require('./package.json');
2-
3-
const version = parseFloat(process.version.substring(1));
4-
const minimum = parseFloat(pkg.engines.node.match(/\d+/g).join('.'));
5-
6-
module.exports = function () {
7-
const openCollective = `
8-
1111111111
9-
1111111111111111
10-
1111111111111111111111
11-
11111111111111111111111111
12-
111111111111111 11111111
13-
1111111111111 111111
14-
1111111111111 111111111 111111
15-
111111111111 11111111111 111111
16-
1111111111111 11111111111 111111
17-
1111111111111 1111111111 111111
18-
1111111111111111111111111 1111111
19-
11111111 11111111
20-
111111 1111111111111111111
21-
11111 11111 111111111111111111
22-
11111 11111111111111111
23-
111111 111111111111111111
24-
11111111111111111111111111
25-
1111111111111111111111
26-
111111111111111111
27-
11111111111
28-
29-
30-
Thanks for installing parse 🙏
31-
Please consider donating to our open collective
32-
to help us maintain this package.
33-
34-
👉 https://opencollective.com/parse-server
35-
36-
`;
37-
process.stdout.write(openCollective);
38-
if (version >= minimum) {
39-
process.exit(0);
40-
}
41-
42-
const errorMessage = `
43-
⚠️ parse-server requires at least node@${minimum}!
44-
You have node@${version}
45-
46-
`;
47-
48-
process.stdout.write(errorMessage);
49-
process.exit(1);
50-
};
1+
const message = `
2+
1111111111
3+
1111111111111111
4+
1111111111111111111111
5+
11111111111111111111111111
6+
111111111111111 11111111
7+
1111111111111 111 111111
8+
1111111111111 111111111 111111
9+
111111111111 11111111111 111111
10+
1111111111111 11111111111 111111
11+
1111111111111 1111111111 111111
12+
1111111111111111111111111 1111111
13+
11111111 11111111
14+
111111 111 1111111111111111111
15+
11111 11111 111111111111111111
16+
11111 1 11111111111111111
17+
111111 111111111111111111
18+
11111111111111111111111111
19+
1111111111111111111111
20+
111111111111111111
21+
11111111111
22+
23+
Thank you for using Parse Platform!
24+
https://parseplatform.org
25+
26+
Please consider donating to help us maintain
27+
this package:
28+
29+
👉 https://opencollective.com/parse-server 👈
30+
31+
`;
32+
33+
function main() {
34+
process.stdout.write(message);
35+
process.exit(0);
36+
}
37+
38+
module.exports = main;

0 commit comments

Comments
 (0)
Please sign in to comment.