Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Medusa requires at least v20 of Node.js. You're using v18. Please install at least v20 and try again: https://nodejs.org/en/download #10663

Open
AveSim13 opened this issue Dec 19, 2024 · 5 comments

Comments

@AveSim13
Copy link

Package.json file

{
  "name": "avesim.art",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "@sanity/image-url": "^1.1.0",
    "@sanity/vision": "^3.68.1",
    "next": "15.1.1",
    "next-sanity": "^9.8.28",
    "react": "^19.0.0",
    "react-dom": "^19.0.0",
    "sanity": "^3.68.1",
    "styled-components": "^6.1.13"
  },

  "devDependencies": {
    "@eslint/eslintrc": "^3",
    "eslint": "^9",
    "eslint-config-next": "15.1.1"
  }

}

Node.js version

v22.12.0

Database and its version

PostgreSQL 16.2

Operating system name and version

Windows 11

Browser name

No response

What happended?

I can't even get Medusa to install. It keeps giving me the error Medusa requires at least v20 of Node.js. You're using v18. Please install at least v20 and try again: https://nodejs.org/en/download but v18 of Node does not exist on my computer. I am using the latest, v22.12.0. I'm just trying to get the dev environment setup for my project.

Expected behavior

create-medusa-app works and it recognizes that I'm using Node.js v22.12.0

Actual behavior

Medusa requires at least v20 of Node.js. You're using v18. Please install at least v20 and try again: https://nodejs.org/en/download

Link to reproduction repo

I don't have this

@sgirones
Copy link
Contributor

hey @AveSim13 , could it be that you are using a node version manager like nvm or fnm? Can you show the output of:

$ ls
$ which node
$ node -v
$ which npm
$ npm -v

Also, what command are you executing to run the medusa server?

@sgirones sgirones self-assigned this Dec 19, 2024
@AveSim13
Copy link
Author

AveSim13 commented Dec 19, 2024

Hey @sgirones, I did a fresh uninstall and reinstall of node and npm. Still getting the same error. I'm just trying to go through the installation instructions from the Medusa documentation. So I'm using npx create-medusa-app@latest. It thinks for a minute, and then it says Medusa requires at least v20 of Node.js. You're using v18. Please install at least v20 and try again: https://nodejs.org/en/download every single time. I can't for the life of me understand where v18 is ever even coming up. Here's the info you asked for.

ls
Directory: C:\Users\avesi\Desktop\avesim.art\avesim.art

where.exe node
C:\Program Files\nodejs\node.exe

Mode LastWriteTime Length Name
d----- 12/18/2024 6:08 PM .next
d----- 12/18/2024 5:54 PM art-store
d----- 12/18/2024 5:48 PM node_modules
d----- 12/18/2024 5:40 PM public
d----- 12/18/2024 5:47 PM src
-a---- 12/18/2024 5:48 PM 81 .env.local
-a---- 12/18/2024 5:40 PM 480 .gitignore
-a---- 12/18/2024 5:40 PM 369 eslint.config.mjs
-a---- 12/18/2024 5:40 PM 77 jsconfig.json
-a---- 12/18/2024 5:40 PM 92 next.config.mjs
-a---- 12/18/2024 5:48 PM 644246 package-lock.json
-a---- 12/18/2024 5:48 PM 559 package.json
-a---- 12/18/2024 5:40 PM 1449 README.md
-a---- 12/18/2024 5:47 PM 363 sanity.cli.js
-a---- 12/18/2024 5:47 PM 898 sanity.config.js

node -v
v23.4.0

where.exe npm
C:\Program Files\nodejs\npm C:\Program Files\nodejs\npm.cmd C:\Users\avesi\AppData\Roaming\npm\npm C:\Users\avesi\AppData\Roaming\npm\npm.cmd

npm -v
11.0.0

Copy link
Contributor

The node version is checked here. I suspect there might be an incompatibility with Windows.

Copy link
Contributor

what command do you execute to create the medusa project?

@AveSim13
Copy link
Author

npx create-medusa-app@latest
I'm just following the documentation 🤷🏼‍♀️ I've never used Medusa before, but wanted to try it. I see you're correct about where that message is coming from. I'll try with MacOS and see if that's any different. Hope it's not a Windows issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants