Important: Before writing this message I made sure I was using version 20.18.1.
I try to create a Svelte project using CLI.I have a problem with Node but I don't understand.My default and use Node version is 20.18.1 but npx use an old version 16.14.2.
Can anyone help me?
npm warn cli npm v10.8.2 does not support Node.js v16.14.2. This version of npm supports the following node versions: `^18.17.0 || >=20.5.0`. You can find the latest version at https://nodejs.org/.│ npm error code EBADENGINE│ npm error engine Unsupported engine│ npm error engine Not compatible with your version of node/npm: @sveltejs/kit@2.8.3│ npm error notsup Not compatible with your version of node/npm: @sveltejs/kit@2.8.3│ npm error notsup Required: {"node":">=18.13"}│ npm error notsup Actual: {"npm":"10.8.2","node":"v16.14.2"}│ npm error A complete log of this run can be found in: /Users/ludwighenriques/.npm/_logs/2024-11-25T14_07_02_924Z-debug-0.log
EDIT 26/11/2024:I've found the problem.I uninstalled version 16.14.2 but I still had the same error message. Which was not possible.I searched my Mac to see if there was a file or folder containing 16.14.2.I found a log file in a node_module folder in the root of my Mac in the same place as .nmv.I remembered doing an npm install in this folder by mistake.I've deleted the node_module folder, everything's fine.