Skip to content

serverless-esbuild doesn't work with external in Yarn 3+ #435

@track0x1

Description

@track0x1

Describe the bug
If I configure an external option in the serverless-esbuild custom config (or try using the esbuild-node-externals plugin), when trying to run Serverless offline mode or Serverless deploy, I get an error that prevents running offline mode or deploying the Lambda. Based on the error message it seems specific to Yarn 3+.

To Reproduce
Steps to reproduce the behavior.
Example repo: https://github.com/track0x1/sls-esbuild-bug

  1. Clone the repo
  2. yarn to install dependencies
  3. yarn start
  4. Notice the error and the fact that offline mode does not start up.

Expected behavior
The commands function as expected. (Deploy or run in offline mode)

Screenshots or Logs

Error:
Error: Command failed with exit code 1: yarn install --frozen-lockfile --non-interactive
➤ YN0050: The --non-interactive option is deprecated

Versions (please complete the following information):

  • OS: Mac
  • Node: 18.13.0
  • Serverless Framework Version: 3.27.0
  • Plugin Version: 6.2.3
  • Yarn version: 3.3.1

Additional context
N/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleased

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions