Failing to build on Windows WSL2 with docker image
drodil opened this issue ยท 0 comments
drodil commented
๐ Bug description
Code fails to compile in the lambda-rust container on Windows WSL2 with Docker. The following error occurs:
Status: Downloaded newer image for softprops/lambda-rust:0.2.7-rust-1.43.1
error: could not find `Cargo.toml` in `/code` or any parent directory
Serverless: Rust build encountered an error: undefined 1.
Error --------------------------------------------------
Error:
at functions.forEach (/home/drodil/code/rustybeer-aws-lambda/node_modules/serverless-rust/index.js:289:15)
at Array.forEach (<anonymous>)
at RustPlugin.build (/home/drodil/code/rustybeer-aws-lambda/node_modules/serverless-rust/index.js:269:22)
at BbPromise.reduce (/home/drodil/code/rustybeer-aws-lambda/node_modules/serverless/lib/classes/PluginManager.js:498:55)
at tryCatcher (/home/drodil/code/rustybeer-aws-lambda/node_modules/bluebird/js/release/util.js:16:23)
at Object.gotValue (/home/drodil/code/rustybeer-aws-lambda/node_modules/bluebird/js/release/reduce.js:168:18)
at Object.gotAccum (/home/drodil/code/rustybeer-aws-lambda/node_modules/bluebird/js/release/reduce.js:155:25)
at Object.tryCatcher (/home/drodil/code/rustybeer-aws-lambda/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/drodil/code/rustybeer-aws-lambda/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/home/drodil/code/rustybeer-aws-lambda/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/home/drodil/code/rustybeer-aws-lambda/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/home/drodil/code/rustybeer-aws-lambda/node_modules/bluebird/js/release/promise.js:729:18)
at _drainQueueStep (/home/drodil/code/rustybeer-aws-lambda/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/home/drodil/code/rustybeer-aws-lambda/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/home/drodil/code/rustybeer-aws-lambda/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/home/drodil/code/rustybeer-aws-lambda/node_modules/bluebird/js/release/async.js:15:14)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
at process.topLevelDomainCallback (domain.js:126:23)
Might be related or duplicate to softprops/lambda-rust#8
๐ค Expected Behavior
Compiling and deployment works.
๐ Steps to reproduce
serverless deploy
The deployment works on MacOS with the same source files.
๐ Your environment
Your Environment Information ---------------------------
- Operating System: linux (Ubuntu 18.04 on WSL2)
- Node Version: 10.19.0
- Framework Version: 2.4.0 (local)
- Plugin Version: 4.0.4
- SDK Version: 2.3.2
- Components Version: 3.2.1
- Docker Engine version: v19.03.13