feat(create-medusa-app, medusa): check Node.js version before installation. (#8452)
Check before installation with `create-medusa-app` and `medusa new` whether the current node version is >= 20. If not, exit with an error.
This commit is contained in:
7
packages/core/utils/src/common/get-node-version.ts
Normal file
7
packages/core/utils/src/common/get-node-version.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export function getNodeVersion(): number {
|
||||
const [major] = process.versions.node.split('.').map(Number)
|
||||
|
||||
return major
|
||||
}
|
||||
|
||||
export const MIN_SUPPORTED_NODE_VERSION = 20
|
||||
@@ -20,6 +20,7 @@ export * from "./get-caller-file-path"
|
||||
export * from "./get-config-file"
|
||||
export * from "./get-duplicates"
|
||||
export * from "./get-iso-string-from-date"
|
||||
export * from "./get-node-version"
|
||||
export * from "./get-selects-and-relations-from-object-array"
|
||||
export * from "./get-set-difference"
|
||||
export * from "./graceful-shutdown-server"
|
||||
|
||||
Reference in New Issue
Block a user