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

Error: Invalid option: "exclude" #78

Closed
bryantbiggs opened this issue Sep 13, 2020 · 2 comments
Closed

Error: Invalid option: "exclude" #78

bryantbiggs opened this issue Sep 13, 2020 · 2 comments
Assignees
Labels
bug Something isn't working released

Comments

@bryantbiggs
Copy link

When using the latest version of the plugin with the latest of esbuild, the following error is encountered:

$ sls deploy -v
Serverless: Auto instrumenting functions with Datadog
Serverless: Adding Lambda Layers to functions
Serverless: Compiling with esbuild...
 
  Error --------------------------------------------------
 
  Error: Invalid option: "exclude"
      at checkForInvalidFlags (/home/bryantbiggs/Documents/dogged-params/node_modules/esbuild/lib/main.js:226:13)
      at flagsForBuildOptions (/home/bryantbiggs/Documents/dogged-params/node_modules/esbuild/lib/main.js:312:3)
      at Object.build (/home/bryantbiggs/Documents/dogged-params/node_modules/esbuild/lib/main.js:469:49)
      at /home/bryantbiggs/Documents/dogged-params/node_modules/esbuild/lib/main.js:703:67
      at new Promise (<anonymous>)
      at Object.build (/home/bryantbiggs/Documents/dogged-params/node_modules/esbuild/lib/main.js:703:26)
      at /home/bryantbiggs/Documents/dogged-params/node_modules/esbuild/lib/main.js:629:27
      at processTicksAndRejections (internal/process/task_queues.js:97:5)
      at async Promise.all (index 0)
 
     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

This is resolved by downgrading to v1.4.0 or by setting the esbuild version to be ~0.6.0 (0.6.34). It looks like somewhere in v0.7.x of esbuild this plugin stopped working with the excludes option

I have a repro here

@floydspace floydspace added the bug Something isn't working label Sep 13, 2020
@floydspace floydspace self-assigned this Sep 13, 2020
@floydspace
Copy link
Owner

@bryantbiggs thank you for your report. indeed, it was breaking change in esbuild v0.7

@floydspace
Copy link
Owner

🎉 This issue has been resolved in version 1.5.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

No branches or pull requests

2 participants