@@ -27,19 +27,34 @@ updateNotifier({ pkg }).notify({ isGlobal: true })
27
27
const MIN_NODE_VERSION = `10.13.0`
28
28
// const NEXT_MIN_NODE_VERSION = `10.13.0`
29
29
30
- if ( ! semver . satisfies ( process . version , `>=${ MIN_NODE_VERSION } ` ) ) {
30
+ const { version } = process
31
+
32
+ if (
33
+ ! semver . satisfies ( version , `>=${ MIN_NODE_VERSION } ` , {
34
+ includePrerelease : true ,
35
+ } )
36
+ ) {
31
37
report . panic (
32
38
report . stripIndent ( `
33
- Gatsby requires Node.js ${ MIN_NODE_VERSION } or higher (you have ${ process . version } ).
39
+ Gatsby requires Node.js ${ MIN_NODE_VERSION } or higher (you have ${ version } ).
34
40
Upgrade Node to the latest stable release: https://gatsby.dev/upgrading-node-js
35
41
` )
36
42
)
37
43
}
38
44
39
- // if (!semver.satisfies(process.version, `>=${NEXT_MIN_NODE_VERSION}`)) {
45
+ if ( semver . prerelease ( version ) ) {
46
+ report . warn (
47
+ report . stripIndent ( `
48
+ You are currently using a prerelease version of Node (${ version } ), which is not supported.
49
+ You can use this for testing, but we do not recommend it in production.
50
+ Before reporting any bugs, please test with a supported version of Node (>=${ MIN_NODE_VERSION } ).` )
51
+ )
52
+ }
53
+
54
+ // if (!semver.satisfies(version, `>=${NEXT_MIN_NODE_VERSION}`)) {
40
55
// report.warn(
41
56
// report.stripIndent(`
42
- // Node.js ${process. version} has reached End of Life status on 31 December, 2019.
57
+ // Node.js ${version} has reached End of Life status on 31 December, 2019.
43
58
// Gatsby will only actively support ${NEXT_MIN_NODE_VERSION} or higher and drop support for Node 8 soon.
44
59
// Please upgrade Node.js to a currently active LTS release: https://gatsby.dev/upgrading-node-js
45
60
// `)
0 commit comments