esbuild icon indicating copy to clipboard operation
esbuild copied to clipboard

No loader is configured for ".node" files

Open alherd-by opened this issue 4 years ago • 2 comments

I have case, when I need to use external library to hash passwords (argon2) in my netlify functions. On netlify servers it's works fine. But when I'm trying to use netlify functions:serve on local machine I get this error:

No loader is configured for ".node" files: node_modules/argon2/lib/binding/napi-v3/argon2.node

    node_modules/argon2/argon2.js:12:12:
      12 │ } = require("./lib/binding/napi-v3/argon2.node");

Steps to reproduce:

  • create function with importing dependency argon2

alherd-by avatar May 18 '22 13:05 alherd-by

See https://github.com/evanw/esbuild/issues/1051#issuecomment-806325487 and a working one in tsup.

hyrious avatar May 18 '22 14:05 hyrious

Closing as a duplicate of #1051.

evanw avatar May 19 '22 02:05 evanw