npm i
get the error:
npm ERR! code 1
npm ERR! path Code/Babylon.js/node_modules/nx
npm ERR! command failed
npm ERR! command sh -c node ./bin/post-install
npm ERR! Code/Babylon.js/node_modules/nx/src/native/index.js:244
npm ERR! throw loadError
npm ERR! ^
npm ERR!
npm ERR! Error: Cannot find module '@nx/nx-darwin-arm64'
npm ERR! Require stack:
npm ERR! - Code/Babylon.js/node_modules/nx/src/native/index.js
npm ERR! - Code/Babylon.js/node_modules/nx/src/hasher/node-task-hasher-impl.js
npm ERR! - Code/Babylon.js/node_modules/nx/src/hasher/task-hasher.js
npm ERR! - Code/Babylon.js/node_modules/nx/src/hasher/hash-task.js
npm ERR! - Code/Babylon.js/node_modules/nx/src/tasks-runner/run-command.js
npm ERR! - Code/Babylon.js/node_modules/nx/src/nx-cloud/utilities/get-cloud-options.js
npm ERR! - Code/Babylon.js/node_modules/nx/bin/post-install.js
npm ERR! at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
npm ERR! at Module._load (node:internal/modules/cjs/loader:922:27)
npm ERR! at Module.require (node:internal/modules/cjs/loader:1143:19)
npm ERR! at require (node:internal/modules/cjs/helpers:121:18)
npm ERR! at Object.<anonymous> (Code/Babylon.js/node_modules/nx/src/native/index.js:135:29)
npm ERR! at Module._compile (node:internal/modules/cjs/loader:1256:14)
npm ERR! at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
npm ERR! at Module.load (node:internal/modules/cjs/loader:1119:32)
npm ERR! at Module._load (node:internal/modules/cjs/loader:960:12)
npm ERR! at Module.require (node:internal/modules/cjs/loader:1143:19) {
npm ERR! code: 'MODULE_NOT_FOUND',
npm ERR! requireStack: [
npm ERR! 'Code/Babylon.js/node_modules/nx/src/native/index.js',
npm ERR! 'Code/Babylon.js/node_modules/nx/src/hasher/node-task-hasher-impl.js',
npm ERR! 'Code/Babylon.js/node_modules/nx/src/hasher/task-hasher.js',
npm ERR! 'Code/Babylon.js/node_modules/nx/src/hasher/hash-task.js',
npm ERR! 'Code/Babylon.js/node_modules/nx/src/tasks-runner/run-command.js',
npm ERR! 'Code/Babylon.js/node_modules/nx/src/nx-cloud/utilities/get-cloud-options.js',
npm ERR! 'Code/Babylon.js/node_modules/nx/bin/post-install.js'
npm ERR! ]
npm ERR! }
npm ERR!
npm ERR! Node.js v18.17.1
npm ERR! A complete log of this run can be found in: .npm/_logs/2024-03-11T14_21_16_170Z-debug-0.log
I have tested node v18 and v20 on my M2 Mac. Both cannot work.