middyjs / middy

🛵 The stylish Node.js middleware engine for AWS Lambda 🛵

Home Page:https://middy.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERR_PACKAGE_PATH_NOT_EXPORTED error

jobuit opened this issue · comments

Describe the bug
When upgrading to the v5 I started getting the error ERR_PACKAGE_PATH_NOT_EXPORTED

To Reproduce
Upgrade from v4 to v5 using node v20

Expected behaviour
A clear and concise description of what you expected to happen.

Environment (please complete the following information):

  • Node.js: v20.2.0
  • Middy: ^5.2.3
image

v5 of Middy only supports ESM, your logs show you're trying to load it as a CJS.