netlify / cli

Netlify Command Line Interface
http://cli.netlify.com
MIT License
1.58k stars 352 forks source link

Error running 'ntl init': Node.js not found #5882

Closed elitostajunior closed 1 year ago

elitostajunior commented 1 year ago

Describe the bug

I'm trying to deploy a React project that I made using Vite and it always gives an error when opening Netlify. I've already updated Node and Npm; I checked the PATH of the system environment, everything is OK; but the problem still persists.

I am concerned as I have done everything I can to resolve this issue. Anyone who can help me, I'll be grateful.

Steps to reproduce

  1. Checked version of Node and Npm;
  2. Run "npm run build";
  3. I installed Netlify in the React project (Vite): "npm install -g netlify-cli";
  4. When I executed the "ntl init" command, it gives the error that prevents the deployment from proceeding.

Configuration

No response

Environment

System: OS: Windows 10 10.0.19043 CPU: (4) x64 Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz Memory: 1.75 GB / 7.89 GB Binaries: Node: 18.17.0 - C:\Program Files\nodejs\node.EXE npm: 9.8.0 - C:\Program Files\nodejs\npm.CMD

$ node -v v18.17.0

$ npm -v 9.8.0

$ npm run build

lab-ecommerce@0.0.0 build vite build

vite v4.4.4 building for production... ✓ 57 modules transformed. dist/index.html 0.39 kB │ gzip: 0.27 kB dist/assets/index-1417ef24.js 175.41 kB │ gzip: 57.50 kB ✓ built in 2.23s

$ npm install netlify-cli -g npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated

added 1297 packages in 60s

186 packages are looking for funding run npm fund for details

$ ntl init C:\Users\Eli\AppData\Roaming\npm/node_modules/node/bin/node: line 1: This: command not found

elitostajunior commented 1 year ago

print-1 print-2 print-3 print-4

Error message: C:\Users\Eli\AppData\Roaming\npm/node_modules/node/bin/node: line 1: This: command not found