sls deploy function -f <function> not respecting entry slsw.lib.entries
See original GitHub issueBug Report
Description
Hi, I searched for this error but I could not find anything related.
serverless-webpack @ 5.3.5 works perfectly.
serverless-webpack @ 5.4.0 does not work as expected.
When I try to update only one function it tries to copy all the functions declared inside the serverless and not the one from slsw.lib.entries.
The whole process occurs OK, compilation and zip generation for just the function from slsw.lib.entries. But when the final process kicks in to copy the artifacts from .webpack to .serverless the plugin search for all the functions generation this error message (the function on the error message is the one not listed inside slsw.lib.entries):
ENOENT: no such file or directory, copyfile '/...../.webpack/<function>.zip' -> '.serverless/<function>.zip'
Obs.: I removed the full path and function name for simplicity.
- Serverless-Webpack Version you’re using: 5.4.0
- Webpack version you’re using: 5.27.1
- Serverless Framework Version you’re using: 2.28.7
- Operating System: Mac OS X 10.15.7
- Stack Trace (if available):
Error: ENOENT: no such file or directory, copyfile '/......./.webpack/<function>.zip' -> '.serverless/<function>.zip'
at Object.copyFileSync (fs.js:1991:3)
at ServerlessWebpack.copyArtifactByName (/....../node_modules/serverless-webpack/lib/packageModules.js:86:6)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:33
- Comments:18 (5 by maintainers)
Top Results From Across the Web
Serverless framework deploy failing with serverless-webpack ...
I am in the beginning of learning the serverless framework and I am ... ["aws-sdk"], entry: slsw.lib.entries, devtool: slsw.lib.webpack.
Read more >serverless slsw.lib.entries is always empty - Stack Overflow
exports = { entry: slsw.lib.entries, ... } in my serverless.yml I declare the function as following:
Read more >How to optimize a serverless typescript eslint webpack setup ...
Here's what you can do to get the most out of it: ... entry: slsw.lib.entries, ... when running sls deploy for faster uploads...
Read more >Rendering and Serving a Create-React-App from an Express ...
As a fun, little, proof-of-concept, I thought it would be interesting to see if I could get a Lambda function running an Express.js...
Read more >Serverless Webpack in Lambda Simplified 101 - Learn | Hevo
There is no configuration. The sls package, sls deploy, and sls deploy function are all supported. Individual functions are packaged into Lambda ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hello 👋 ~Does someone have, by any chance, a minimal reproducible example that I could run on my side in order to debug/diagnose the problem?~ Nvm, managed to reproduce, will try to post PR with a fix as soon as possible.
Like @ffxsam said,
package.individually: false
is not optimal. Currently, the only option is to downgrade tov.5.3.5
or turn off thepackage.individually
flag. Neither should be a solution.I’d be glad if someone could review what caused the regression between
v.5.3.5
andv.5.4.0
.