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.

env-cmd fails on WSL2

See original GitHub issue

env-cmd 9.0.3 env: Windows 10 WSL2

env-cmd -f ./.env.staging my-build-script                             
Error: spawn EPERM
    at ChildProcess.spawn (internal/child_process.js:394:11)                                                                at Object.spawn (child_process.js:535:9)                                                                                
at Object.spawn (/home/jdunlap/n/lib/node_modules/env-cmd/node_modules/cross-spawn/index.js:12:24)                      at Object.<anonymous> (/home/jdunlap/n/lib/node_modules/env-cmd/dist/env-cmd.js:57:30)                                  
at Generator.next (<anonymous>)
    at fulfilled (/home/jdunlap/n/lib/node_modules/env-cmd/dist/env-cmd.js:4:58) {                                        errno: 'EPERM',                                                                                                         
code: 'EPERM',                                                                                                          
syscall: 'spawn'                                                                                                      
}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jadboxcommented, Aug 12, 2019

Closing this for now as I don’t have time to set up the Windows env again to test. Hopefully there’s a better way to diagnose problematic wsl PATH issues in the future (if that’s the issue).

1reaction
jadboxcommented, Jul 27, 2019

I had to leave wsl2 due to the bug… I’ll give it another try over the weekend if I can with the ‘clean PATH’ trick. Anything else I should try?

Read more comments on GitHub >

github_iconTop Results From Across the Web

WSL2 Server Environment Setup Fail server env-setup Not ...
Issue Type: Bug. On all wsl2 open commands, server fails at start. Version: 1.55.0-insider (system setup)
Read more >
Command not found in WSL2 even though it's on the path
1 Answer 1 · Start WSL without your startup profile. It's very likely that something (or you) added a line that is causing...
Read more >
Troubleshooting Windows Subsystem for Linux | Microsoft Learn
Provides detailed information about common errors and issues people run into while running Linux on the Windows Subsystem for Linux.
Read more >
Fix NPM No Such File Error on WSL2 - PäksTech
The npm command would fail with a “no such file or directory error” like this: $ npm install /usr/bin/env: 'bash\r': No such file...
Read more >
How to set up DISPLAY variable for WSL2 of ubuntu 20?
For Me, to make xlaunch X11 server works properly, I have to set DISPLAY every time the host localhost IP is changed using...
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