medusa
medusa copied to clipboard
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/[email protected]: 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/[email protected]: Deprecated in favor of @oclif/core
npm WARN deprecated [email protected]: Use your platform's native atob() and btoa() methods instead
npm WARN deprecated @babel/[email protected]: 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 [email protected]: Use your platform's native DOMException instead
npm WARN deprecated [email protected]: Use your platform's native performance.now() and performance.timeOrigin.
npm WARN deprecated @oclif/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated @oclif/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated @oclif/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated @oclif/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated @oclif/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated @oclif/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated @oclif/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated @oclif/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated [email protected]: core-js@<3.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 [email protected]
npm ERR! gyp info using [email protected] | 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.
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/[email protected]: Deprecated in favor of @oclif/core npm WARN deprecated @oclif/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated @oclif/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated @oclif/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated @oclif/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated @oclif/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated @oclif/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated @oclif/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated @oclif/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. npm WARN deprecated [email protected]: 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):
I accidentally opened up a new issue, and this is pretty much what I get when I run npx create-medusa-app@latest
.
@oneofvalts I think it does not support node version beyond v18.
Yes, with v18.17.0, both medusa and storefront runs fine.
Yes, with v18.17.0, both medusa and storefront runs fine.
I used node v18.17.0 and getting the same error
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
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
Same for me. I have the LTS installed and it doesn‘t work.
Same here. I understand that this is opensource, but bugs during installation (when all the prerequisites are installed & followed) really kills the trust for the project.
If this helps:
Error: binding.gyp not found
OS: Win11
GCC installed,
Visual studio build tools installed (2019)
Node v20.11.0
Npm 10.5.0
@shahednasser, any chance you could look into this one? 🙏
For me the error seemed to come from the node-gyp module. In the end I was able to fix the issue by deleting the content of .../AppData/Roaming/npm and reinstalling nodejs.
For me the error seemed to come from the node-gyp module. In the end I was able to fix the issue by deleting the content of .../AppData/Roaming/npm and reinstalling nodejs.
I've just tried that, still getting the error:
An error occurred while preparing project: Error: Command failed: npm install --legacy-peer-deps...
npm ERR! gyp: binding.gyp not found
@thatcuteseller How did you end up solving this? I'm having this same issue and it looks like justasam is, too.
Hey guys, can you try re-running the installation process?
I don't want to insist on the same thing but I had a similar issue and resolved it through changing the node version to LTS.
Did all of you guys tried chaning your node version to the LTS? It's an easy process with n
npm install -g n
n 20.12.0
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!
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
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
It worked with my version which used to fail beforehand, thanks!! Could you provide any info on what was the solution (e.g. link the PR)?
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.
@shahednasser which dependency? I deployed today on heroku and got the same gyp failure. Our System runs on node 18.x
@WoodlegDev I fixed it by using n to manage my node version. Worked fine after that.
@WoodlegDev please install @stdlib/[email protected]
. Sorry for the inconvenience, we're looking into putting out a fix soon.