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.

`'C:\Program' is not recognized as an internal or external command`

See original GitHub issue
$ npx denoify
C:\Users\Wojciech\AppData\Roaming\npm-cache\_npx\3560\node_modules\denoify\bin\denoify.js:6
process.once("unhandledRejection", error => { throw error; });
                                              ^

Error: Command failed: C:\Program Files\nodejs\node.exe C:\Users\Wojciech\AppData\Roaming\npm-cache\_npx\3560\node_modules\denoify\bin\replacer\index.js "import { Buffer } from \"buffer\"" 0.0.0 "deno_lib\\core\\network"
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

    at ChildProcess.exithandler (child_process.js:303:12)
    at ChildProcess.emit (events.js:315:20)
    at maybeClose (internal/child_process.js:1051:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) {
  killed: false,
  code: 1,
  signal: null,
  cmd: 'C:\\Program Files\\nodejs\\node.exe C:\\Users\\Wojciech\\AppData\\Roaming\\npm-cache\\_npx\\3560\\node_modules\\denoify\\bin\\replacer\\index.js "import { Buffer } from \\"buffer\\"" 0.0.0 "deno_lib\\\\core\\\\network"',
  stderr: "'C:\\Program' is not recognized as an internal or external command,\r\n" +
    'operable program or batch file.\r\n'
}

I believe the reason is creating a shell command by naive string concatenation: https://github.com/garronej/denoify/blob/a81800d634936f2214481f2d6888661494834e41/src/lib/replacer.ts#L103-L106

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
garronejcommented, Sep 7, 2020

Cool! This is a big project. I will try to help you Denoify it.

1reaction
garronejcommented, Sep 5, 2020

@wojpawlik sorry, I haven’t been able to do it yet but I am on it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Command Prompt Error 'C:\Program' is not recognized as an ...
Command Prompt Error 'C:\Program' is not recognized as an internal or external command, operable program or batch file - Stack Overflow. Stack ...
Read more >
5 Ways to Fix the "Not Recognized as an Internal or External ...
1. Verify if the Program Is Installed · 2. Use the Full File Path to Execute the Command · 3. Use the Full...
Read more >
How to Fix “not recognized as an internal or external ...
The “is not recognized as an internal command” error usually occurs because the computer can't find the executable that you're asking it to...
Read more >
'C:\Program' is not recognized as an internal or external ...
1) Usually, "C:\Program" is not recognized... errors are because the folder is C:\Program Files and some full-path command is not surrounded by ...
Read more >
'C:\Program' is not recognized as an internal or external ...
The error "'C:\Program' is not recognized as an internal or external command, operable program or batch file" occurs when the specified path contains...
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