event-gateway-example icon indicating copy to clipboard operation
event-gateway-example copied to clipboard

spawn sle ENOENT

Open nileshdt opened this issue 7 years ago • 11 comments

Hello I get an error while executing sls run on services/users. spawn sle ENOENT Thanks

nileshdt avatar Aug 18 '17 13:08 nileshdt

thanks reporting! do mind sharing your operating system, node and npm version?

nikgraf avatar Aug 18 '17 15:08 nikgraf

Sure I am using Node 7.1.0 sls 1.20.2 npm 4.0.5 windows 7 service pack 1 Thanks

nileshdt avatar Aug 18 '17 15:08 nileshdt

Same thing. Node v6.10.2 sls 1.20.2 npm 3.10.10 windows 10 x64

barfet avatar Aug 26 '17 10:08 barfet

Thanks for letting me know! Will give it a try asap and get back to you.

nikgraf avatar Aug 28 '17 06:08 nikgraf

@plfx can you give this a try with your Windows machine?

nikgraf avatar Aug 30 '17 09:08 nikgraf

I had a similar issue and raised it here https://github.com/serverless/event-gateway-example/issues/25. Can close though as it's basically this.

patoncrispy avatar Sep 16 '17 22:09 patoncrispy

This is because of the process spawning code in manageLocalEmulator.js (also in eventGatewayInstalled.js, installLocalEmulator.js, localEmulatorInstalled.js, manageEventGateway.js in the "run" plugin) and occurs due to a known problem with the use of child_process on Windows. I fixed it by changing the code to use the widely used cross-spawn npm library (https://github.com/IndigoUnited/node-cross-spawn), which is a drop-in replacement that provides correct cross-platform handling of such issues.

The changes a are on my fork (https://github.com/jawish/serverless/commit/5aca3abfad24f4f3a18b469969664fb5b75b01eb). Shall I make a pull request to merge the fix?

jawish avatar Sep 28 '17 07:09 jawish

still seems to be an issue on my windows machine, any further word on this?

srp-synengco avatar Dec 05 '17 02:12 srp-synengco

Same issue here:

Your Environment Information ----------------------------- OS: win32 Node Version: 9.2.0 Serverless Version: 1.24.1

mcolomerc avatar Dec 18 '17 22:12 mcolomerc

Same issue. OS: win32 Node Version: 8.9.4 Serverless Version: 1.26.1

fang0rnz avatar Mar 22 '18 19:03 fang0rnz

Same issue : OS: win32 Node Version: 8.11.1 Serverless Version: 1.27.3

MedGhassen avatar May 29 '18 11:05 MedGhassen