0

Node v18.16.0 NPM v9.6.7 NUXT v3.5.2 (latest)

npm install nuxt@latest fails.

from a verbose version of the install, these errors:

npm info run esbuild@0.17.19 postinstall { code: 'ENOENT', signal: undefined } npm verb stack Error: spawn bash ENOENT npm verb stack at ChildProcess._handle.onexit (node:internal/child_process:283:19) npm verb stack at onErrorNT (node:internal/child_process:476:16) npm verb stack at process.processTicksAndRejections (node:internal/process/task_queues:82:21) npm verb pkgid esbuild@0.17.19

Any suggestions - much appreciated.

Artfree
  • 111
  • 4
  • What platform are you using? Is it running in docker? You might find this useful: https://stackoverflow.com/a/27688805/2419215 – fodma1 May 30 '23 at 19:39
  • Windows 10 - is that what you're asking? Sorry, I'm a newbie front end developer. Don't know about Docker, nor have I set any of the error message parameters (like Spawn). I had a number of existing Nuxt projects running node v11 . . . and Nuxt version 1. Thought it was time to update. When I tried, everything fell apart. I couldn't even get into my development environment (npm run dev). In every case, there was an error message displayed similar to the one above. I'm totally at a loss. Any clues as to why this occured (and how to fix it) would be MOST appreciated. Thank you. – Artfree May 31 '23 at 00:54
  • It's likely having to do with the missing bash environment. Is windows supported on this newer version of nuxt? – fodma1 Jun 11 '23 at 08:51
  • I upgraded Node from v11 to v18. Could that somehow have deleted the bash environment? If so, how to reinstall it? For this issue, I installed 'GIT-for-Windows' - which has its own Bash, and was able there to successfully initialize a new Nuxt project. So, that's a work-around, but what happened to the original Bash? (Nuxt version 3 (latest version) runs fine on Windows 10). – Artfree Jun 11 '23 at 21:28
  • No, it's more likely having to do with nuxt 3. It says, that one of its dependencies, esbuild has a postinstall script, that fails. Not sure how node is wired in wondows. I think it's unlikely that it did anything to bash, more likely that it just won't see it for some reason. – fodma1 Jun 13 '23 at 09:47
  • The Nuxt folks blame my Node installation. They recommend I install a Node Version Manager. Who knows. In Windows, CMD and Powershell both failed as well. I'm grateful to have found Bash in GIT-for-Windows. It works, and Nuxt is responsive. I'm just concerned that, going forward, this issue may reoccur. But I wish I could somehow restore the old Bash (and have CMD and Powershell be OK). Any thoughts on how to do so? – Artfree Jun 13 '23 at 21:32
  • NVM is definitely recommended. It makes life so much easier. Instead of having to remove / reinstall node every time you switch between projects of different node versions, you simply `nvm use vxx`. Yeah actually it sounds like it's a problem with bash, but I don't know how's that integrated in windows. – fodma1 Jun 14 '23 at 04:52
  • OK. I'll install NVM-Windows. Right now, though, with migrating from Nuxt version 1 to 3, I'm having to rewrite ALL of my apps, and since they're all new I can just fix one version of node. When I initiated a new Nuxt project, it installed "@types/node": "^18" as a devDependency in package.json. Do you know what that is? If it's just saying 'use node v18 or later' ? Would that conflict with NVM-Windows? – Artfree Jun 14 '23 at 16:49

0 Answers0