boostercloud / booster

Booster Framework
https://www.boosterframework.com
Apache License 2.0
417 stars 87 forks source link

Your first Booster app in 10 minutes with Windows 10: lambda handle info path '\' makes crash, should be changed to '/' #611

Open m-alcu opened 3 years ago

m-alcu commented 3 years ago

Bug Report

Current Behavior

GraphQL test does not work because lambda handle info is: dist\index.boosterServeGraphQL

{ "errorType": "Runtime.ImportModuleError", "errorMessage": "Error: Cannot find module 'dist\index'\nRequire stack:\n- /var/runtime/UserFunction.js\n- /var/runtime/index.js", "stack": [ "Runtime.ImportModuleError: Error: Cannot find module 'dist\index'", "Require stack:", "- /var/runtime/UserFunction.js", "- /var/runtime/index.js", " at _loadUserApp (/var/runtime/UserFunction.js:100:13)", " at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)", " at Object. (/var/runtime/index.js:43:30)", " at Module._compile (internal/modules/cjs/loader.js:999:30)", " at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)", " at Module.load (internal/modules/cjs/loader.js:863:32)", " at Function.Module._load (internal/modules/cjs/loader.js:708:14)", " at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)", " at internal/main/run_main_module.js:17:47" ] }

Expected behavior

Handle info should have '/' instead to run correctly. I have checked and this fixing handle info does the fix.

Possible Solution

Modifying by hand solves the problem, but is not a good solution. The correct way should be to modify build generation for all platforms. I suppose that this behavior is caused by the Windows 10 OS

Environment

javiertoledo commented 3 years ago

Thanks for reporting it. As a workaround, you could use the Windows Subsystem for Linux to run Booster commands, you can find install instructions here: https://learn.microsoft.com/en-us/windows/wsl/install