You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using Nuxt 3 to implement a server api (REST) with mysql2 as the DB driver. This was working fine when in development mode, but when the Nuxt app is built (npx nuxt build) and previewed (npm nuxt preview), the use of named placeholders in a query will cause an exception, reporting that LRUCache requires the use of new.
This stems from the named-placeholders dependency, which requires the LRUCache package, then treats the default export as a function when in later versions of LRUCache its a constructor.
Nuxt has a dependency on LRUCache 6, whereas named-placeholders has a dependency on 4.1.5.
It seems odd that the conflict only occurs in the built version, and was working ok in nuxt development mode (npx nuxt dev).
named-placeholders hasn't been updated in 4+ years and issues appear to go unacknowledged so maybe its been abandoned.
The text was updated successfully, but these errors were encountered:
named-placeholders hasn't been updated in 4+ years and issues appear to go unacknowledged so maybe its been abandoned.
I'm original author, happy to give the package some refresh, but encourage you to contribute as well ( migrate CI to github actions, enable dependabot action, add release-please etc )
I've been using Nuxt 3 to implement a server api (REST) with mysql2 as the DB driver. This was working fine when in development mode, but when the Nuxt app is built (
npx nuxt build
) and previewed (npm nuxt preview
), the use of named placeholders in a query will cause an exception, reporting that LRUCache requires the use ofnew
.This stems from the
named-placeholders
dependency, whichrequire
s the LRUCache package, then treats the default export as a function when in later versions of LRUCache its a constructor.Nuxt has a dependency on LRUCache 6, whereas named-placeholders has a dependency on 4.1.5.
It seems odd that the conflict only occurs in the built version, and was working ok in nuxt development mode (
npx nuxt dev
).named-placeholders
hasn't been updated in 4+ years and issues appear to go unacknowledged so maybe its been abandoned.The text was updated successfully, but these errors were encountered: