Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sls package fails with individually: true for specific function Error: ENOENT: no such file or directory, copyfile #521

Open
guyschlider opened this issue Jan 29, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@guyschlider
Copy link

guyschlider commented Jan 29, 2024

Describe the bug

When trying to use the

package:
    individually: true

flag, I get an error about a specific function not being packed.

To Reproduce

Expected behavior
A zip file for each function, or an error of why the zip wasn't created for that function

Screenshots or Logs

Environment: darwin, node 18.12.1, framework 3.38.0 (local), plugin 7.2.0, SDK 4.5.1
Credentials: Local, "devmfa" profile
Docs:        docs.serverless.com
Support:     forum.serverless.com
Bugs:        github.com/serverless/serverless/issues

Function zipped: function - 944.36 KB [178 ms]
All functions zipped.
Environment: darwin, node 18.12.1, framework 3.38.0 (local), plugin 7.2.0, SDK 4.5.1
Credentials: Local, "devmfa" profile
Docs:        docs.serverless.com
Support:     forum.serverless.com
Bugs:        github.com/serverless/serverless/issues

Error:
Cannot access package artifact at ".esbuild/.serverless/function.zip" (for "function"): ENOENT: no such file or directory, access '/Users/guyschlider/Apps/app/project/.esbuild/.serverless/function.zip'
^C

Versions (please complete the following information):

  • OS: Mac
  • Serverless Framework Version: 3.38.0
  • Plugin Version: 1.50.2
@guyschlider guyschlider added the bug Something isn't working label Jan 29, 2024
@MrAGi
Copy link

MrAGi commented Jun 11, 2024

I am seeing the same issue on both Mac OS and Linux (via CI) on plugin version 1.52.1:

Environment: darwin, node 18.16.0, framework 3.38.0 (local), plugin 7.2.0, SDK 4.5.1
Docs:        docs.serverless.com
Support:     forum.serverless.com
Bugs:        github.com/serverless/serverless/issues

Error:
Cannot access package artifact at ".esbuild/.serverless/validateEmail.zip" (for "validateEmail"): ENOENT: no such file or directory, access '/Users/<userName>/Documents/project/.build/.esbuild/.serverless/validateEmail.zip'
Environment: linux, node 18.20.3, framework 3.38.0 (local), plugin 7.2.0, SDK 4.5.1
Docs:        docs.serverless.com
Support:     forum.serverless.com
Bugs:        github.com/serverless/serverless/issues

Error:
Cannot access package artifact at ".esbuild/.serverless/validateEmail.zip" (for "validateEmail"): ENOENT: no such file or directory, access '/home/runner/work/project/.build/.esbuild/.serverless/validateEmail.zip'

@MrAGi
Copy link

MrAGi commented Jun 11, 2024

looks like I solved my own problem it was a bad interaction with serverless-plugin-typescript that was causing the error. I just removed that plugin and now esbuild appears to be working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants