#What is a good way to use ESM package lucia with nest js

7 messages · Page 1 of 1 (latest)

stiff surge
#

I read this comment https://github.com/nestjs/nest/issues/7021#issuecomment-831799620, which suggests to use a bundler..

can anyone please share some example/relevant docs/any helpful links, about how this might be achieved.

I have read this post in stack overflow https://stackoverflow.com/a/75287028/15710459
but none of the methods seem elegant

GitHub

Feature Request Is your feature request related to a problem? Please describe. A lot of npm packages are now being published as “ESM-only” (shipping only ES modules with no CommonJS version) which ...

worn iris
#

Don't have to do any of this.

Add node-options=--experimental-require-module to your .npmrc

stiff surge
#

node: --experimental-require-module is not allowed in NODE_OPTIONS

#

node --version
v21.5.0

#

gotcha.. i need version v22.0

worn iris
#

Correct.

stiff surge
#

thanks a lot its working!