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)
🐛 Bug description
Code fails to compile in the lambda-rust container on Windows WSL2 with Docker. The following error occurs:
Might be related or duplicate to https://github.com/softprops/lambda-rust/issues/8
🤔 Expected Behavior
Compiling and deployment works.
👟 Steps to reproduce
The deployment works on MacOS with the same source files.
🌍 Your environment
Your Environment Information ---------------------------