medusa: Error during installation

ubuntu@ip-132-10-2-40:~$ medusa new my-medusa-store ✔ Created starter directory layout – 1065ms info: Installing packages…

npm WARN deprecated @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead. npm WARN deprecated @oclif/screen@1.0.4: Deprecated in favor of @oclif/core npm WARN deprecated abab@2.0.6: Use your platform’s native atob() and btoa() methods instead npm WARN deprecated @babel/plugin-proposal-optional-chaining@7.21.0: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead. npm WARN deprecated domexception@2.0.1: Use your platform’s native DOMException instead npm WARN deprecated w3c-hr-time@1.0.2: Use your platform’s native performance.now() and performance.timeOrigin. npm WARN deprecated @oclif/command@1.8.36: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated @oclif/help@1.0.15: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated @oclif/errors@1.3.6: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated @oclif/errors@1.3.5: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated @oclif/parser@3.8.17: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated @oclif/config@1.18.17: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated @oclif/config@1.18.2: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated @oclif/config@1.18.16: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated cli-ux@5.6.7: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated core-js@1.2.7: core-js@❤️.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. npm ERR! code 1 npm ERR! path /home/ubuntu/my-medusa-store/node_modules/@stdlib/number-float64-base-normalize npm ERR! command failed npm ERR! command sh -c node-gyp rebuild npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@10.0.1 npm ERR! gyp info using node@18.19.1 | linux | x64 npm ERR! gyp info find Python using Python version 3.10.12 found at “/usr/bin/python3” npm ERR! gyp info spawn /usr/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args ‘/home/ubuntu/.nvm/versions/node/v18.19.1/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py’, npm ERR! gyp info spawn args ‘binding.gyp’, npm ERR! gyp info spawn args ‘-f’, npm ERR! gyp info spawn args ‘make’, npm ERR! gyp info spawn args ‘-I’, npm ERR! gyp info spawn args ‘/home/ubuntu/my-medusa-store/node_modules/@stdlib/number-float64-base-normalize/build/config.gypi’, npm ERR! gyp info spawn args ‘-I’, npm ERR! gyp info spawn args ‘/home/ubuntu/.nvm/versions/node/v18.19.1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi’, npm ERR! gyp info spawn args ‘-I’, npm ERR! gyp info spawn args ‘/home/ubuntu/.cache/node-gyp/18.19.1/include/node/common.gypi’, npm ERR! gyp info spawn args ‘-Dlibrary=shared_library’, npm ERR! gyp info spawn args ‘-Dvisibility=default’, npm ERR! gyp info spawn args ‘-Dnode_root_dir=/home/ubuntu/.cache/node-gyp/18.19.1’, npm ERR! gyp info spawn args ‘-Dnode_gyp_dir=/home/ubuntu/.nvm/versions/node/v18.19.1/lib/node_modules/npm/node_modules/node-gyp’, npm ERR! gyp info spawn args ‘-Dnode_lib_file=/home/ubuntu/.cache/node-gyp/18.19.1/<(target_arch)/node.lib’, npm ERR! gyp info spawn args ‘-Dmodule_root_dir=/home/ubuntu/my-medusa-store/node_modules/@stdlib/number-float64-base-normalize’, npm ERR! gyp info spawn args ‘-Dnode_engine=v8’, npm ERR! gyp info spawn args ‘–depth=.’, npm ERR! gyp info spawn args ‘–no-parallel’, npm ERR! gyp info spawn args ‘–generator-output’, npm ERR! gyp info spawn args ‘build’, npm ERR! gyp info spawn args ‘-Goutput_dir=.’ npm ERR! gyp info spawn args ] npm ERR! gyp: binding.gyp not found (cwd: /home/ubuntu/my-medusa-store/node_modules/@stdlib/number-float64-base-normalize) while trying to load binding.gyp npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: gyp failed with exit code: 1 npm ERR! gyp ERR! stack at ChildProcess.<anonymous> (/home/ubuntu/.nvm/versions/node/v18.19.1/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:271:1 8) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:517:28) npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:292:12) npm ERR! gyp ERR! System Linux 6.5.0-1014-aws npm ERR! gyp ERR! command “/home/ubuntu/.nvm/versions/node/v18.19.1/bin/node” “/home/ubuntu/.nvm/versions/node/v18.19.1/lib/node_modules/npm/node_modules/node- gyp/bin/node-gyp.js” “rebuild” npm ERR! gyp ERR! cwd /home/ubuntu/my-medusa-store/node_modules/@stdlib/number-float64-base-normalize npm ERR! gyp ERR! node -v v18.19.1 npm ERR! gyp ERR! node-gyp -v v10.0.1 npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /home/ubuntu/.npm/_logs/2024-02-23T12_55_48_432Z-debug-0.log Error: Command failed with exit code 1: npm install at makeError (/home/ubuntu/.nvm/versions/node/v18.19.1/lib/node_modules/@medusajs/medusa-cli/node_modules/execa/lib/error.js:60:11) at handlePromise (/home/ubuntu/.nvm/versions/node/v18.19.1/lib/node_modules/@medusajs/medusa-cli/node_modules/execa/index.js:118:26) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async install (/home/ubuntu/.nvm/versions/node/v18.19.1/lib/node_modules/@medusajs/medusa-cli/dist/commands/new.js:113:13) at async clone (/home/ubuntu/.nvm/versions/node/v18.19.1/lib/node_modules/@medusajs/medusa-cli/dist/commands/new.js:173:5) at async newStarter (/home/ubuntu/.nvm/versions/node/v18.19.1/lib/node_modules/@medusajs/medusa-cli/dist/commands/new.js:486:9) { shortMessage: ‘Command failed with exit code 1: npm install’, command: ‘npm install’, escapedCommand: ‘npm install’, exitCode: 1, signal: undefined, signalDescription: undefined, stdout: undefined, stderr: undefined, failed: true, timedOut: false, isCanceled: false, killed: false }

ubuntu@ip-~$ npm install @medusajs/medusa-cli -g npm WARN deprecated @oclif/screen@1.0.4: Deprecated in favor of @oclif/core npm WARN deprecated @oclif/command@1.8.36: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated @oclif/help@1.0.15: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated @oclif/errors@1.3.6: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated @oclif/errors@1.3.5: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated @oclif/config@1.18.2: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated @oclif/parser@3.8.17: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated @oclif/config@1.18.17: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated @oclif/config@1.18.16: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated cli-ux@5.6.7: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

changed 330 packages in 14s

48 packages are looking for funding run npm fund for details ubuntu@ip-(IP adddres here) :~$ medusa -v Medusa CLI version: 1.3.22

System information

Medusa version (stable): Node.js version: 18 Database: Postgres Operating system:Ubuntu 22.04 Browser (if relevant):

About this issue

  • Original URL
  • State: closed
  • Created 4 months ago
  • Reactions: 2
  • Comments: 21 (5 by maintainers)

Commits related to this issue

Most upvoted comments

@WoodlegDev please install @stdlib/number-float64-base-normalize@0.0.8. Sorry for the inconvenience, we’re looking into putting out a fix soon.

@shahednasser, any chance you could look into this one? 🙏

It was actually due to a dependency of another dependency causing the issue, which we resolved in the starter repository that’s cloned in the installation process by installing a version of the dependency that fixes the error. This is mostly a temporary solution as we’re still figuring out a better one for the original dependency we use.

I had already been using 20.12.0, but switching to using n to manage versions seems to have done the trick. Medusa installed without issue now! Much appreciated!

Actually we issued out a fix that should fix it for all versions 😄 so feel free to try out with the version you were using as well

Yes, with v18.17.0, both medusa and storefront runs fine.

I used node v18.17.0 and getting the same error

Go and change the node version to the LTS

npm install -g n
n 20.11.1

and try again

I am on v21.7.1 at it does not work

@oneofvalts I think it does not support node version beyond v18.