spawn C:\Windows\system32\cmd.exe ENOENT

See original GitHub issue

Is this a BUG or a FEATURE REQUEST?: BUG

What happened:

[Nest] 11360   - 2019-04-11 10:45   [ExceptionsHandler] spawn C:\Windows\system32\cmd.exe ENOENT +1368ms
Error: spawn C:\Windows\system32\cmd.exe ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:246:19)
    at onErrorNT (internal/child_process.js:427:16)
    at processTicksAndRejections (internal/process/next_tick.js:76:17)

What you expected to happen: That the project will work in any directory without running npm i

How to reproduce it (as minimally and precisely as possible): Just move .exe from project directory and run

Anything else we need to know?: I use NestJS, but I’m sure that such a problem will happen without it

Environment

  • Platform(OS/Version): Windows 10 x64
  • Host Node Version: v11
  • Target Node Version: v11
  • Nexe version: 3.1.0
  • Python Version: 2.7

Nexe config

const { compile } = require('nexe');
const path = require('path');

const config = {
  input: path.join(__dirname, 'dist', 'main.js'),
  build: true,
  name: 'service',
};

const success = () => console.log('Success');
const error = error => console.error(error);

compile(config)
  .then(success)
  .catch(error);

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
calebboydcommented, Apr 16, 2019

screenshot-desktop executes a batch file. Just ensure that batch file exists.

myapp
node_modules
  screenshot-desktop
    lib
      win32
        screenCapture_1.3.2.bat
        app.manifest
0reactions
liuchengtscommented, Jun 20, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

spawn C:\Windows\system32\cmd.exe ENOENT error ... - GitHub
Steps to Reproduce: Create a new file and run a command using childProcess.exec(); The script runs fine when I run the script through ......
Read more >
NodeJs Error: spawn C:\Windows\system32\cmd.exe; ENOENT
Sounds to me like Node doesn't have a PATH or doesn't have permission to run cmd.exe . It's trying to run cmd.exe for...
Read more >
ended with error spawn C:\WINDOWS\system32\cmd.exe ...
Hi guys, When i am starting to connect my org and visualforce, i am getting the below error. Starting SFDX: Authorize an Org...
Read more >
ended with error spawn cmd.exe ENOENT - YouTube
ended with error spawn cmd. exe ENOENT (salesforce) ... to Install and Set Visual Studio Code and MinGW Compiler for C and C++...
Read more >
NodeJs Error: spawn C:\Windows\system32\cmd.exe; ENOENT
NOTE: This error is almost always caused because the command does not exist, because the working directory does not exist, or from a...
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