question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The path of node js is not correctly recognized on Windows

See original GitHub issue
  • Electron-Builder Version: 22.11.7
  • Node Version: 14.17.3
  • Electron Version: 13.1.6
  • Electron Type (current, beta, nightly): current
  • Target: N/A

While running installing-app-deps or any other commands, following error occurs:

  • electron-builder  version=22.11.7
  • loaded configuration  file=package.json ("build" field)
  • installing production dependencies  platform=win32 arch=x64 appDir=D:\dev\cryptoElectron\src
  • spawning        command=C:\Users\Losse\AppData\Local\Temp\xfs-8e15e263\node yarn install --production cwd=D:\dev\cryptoElectron\src
  • exited          command=node code=-4058 pid=undefined
  ⨯ spawn C:\Users\Losse\AppData\Local\Temp\xfs-8e15e263\node ENOENT  failedTask=installAppDeps stackTrace=Error: spawn C:\Users\Losse\AppData\Local\Temp\xfs-8e15e263\node ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:467:16)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)

This may relate to the spawn method, the closest code I found is: https://github.com/electron-userland/electron-builder/blob/5b4305ec336cf6f5866a26cde7fe99f18d7ac566/packages/app-builder-lib/src/util/yarn.ts#L108

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:20 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
Lossescommented, Aug 8, 2021

@mmaietta Wow, thanks!

1reaction
Lossescommented, Jul 19, 2021

@mmaietta since process.env.npm_execpath already have a value, process.env.NPM_CLI_JS won’t be used.

I’m really headache about how to handle this, adding another env variable like USE_YARN_COMMAND which will trigger which may be a solution? How can we name this variable is another problem…

Read more comments on GitHub >

github_iconTop Results From Across the Web

'node' is not recognized as an internal or an external ...
In Windows, you need to set node.js folder path into system variables or user variables. 1) open Control Panel -> System and Security...
Read more >
How to resolve 'node' is not recognized as an internal ...
Open the Environment Variables option in your Control Panel. · Select the variable named Path. · Restart the command prompt again and now...
Read more >
'Node' Is Not Recognized As An Internal Or External ...
'node' is not recognized as an internal or external command, operable program or batch file ❓ [How to Solve] · Open Control Panel...
Read more >
How to resolve the “node is not recognized as an internal ...
To properly install Node.js, open your favorite browser and visit the official Node.js website. Click on the windows installer shown in the below...
Read more >
Solving node is not recognized as an internal or external ...
Open the command line and type, assuming this is your original path, “SET PATH=C:\Program Files\Nodejs;%PATH%”. So these are a few ways to avoid ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found