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:
Shahed Nasser
2024-08-06 10:15:17 +03:00
committed by GitHub
parent 413e29837c
commit 98f42e8995
6 changed files with 24 additions and 1 deletions

View 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

View File

@@ -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"