Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ERROR] No loader is configured for ".node" files: node_modules/canvas/build/Release/canvas.node #28

Open
zxkane opened this issue Jan 22, 2022 · 1 comment

Comments

@zxkane
Copy link

zxkane commented Jan 22, 2022

Using this library in a TypeScript app with esbuild, see the below error,

$ /home/ubuntu/environment/checker/node_modules/.bin/esbuild --bundle /home/ubuntu/environment/checker/src/lambda.d/checker/index.ts --target=node14 --platform=node --outfile=/home/ubuntu/environment/checker/cdk.out/bundling-temp-a5c74f113b8c87a1a34f41dde7ae72eba852d1bccfbaa6b6573360a5e136168d/index.js --external:aws-sdk
✘ [ERROR] No loader is configured for ".node" files: node_modules/canvas/build/Release/canvas.node

    node_modules/canvas/lib/bindings.js:3:25:
      3 │ module.exports = require('../build/Release/canvas.node')
        ╵                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1 error
child_process.js:830
    throw err;
    ^

Error: Command failed: /home/ubuntu/environment/checker/node_modules/esbuild-linux-64/bin/esbuild --bundle /home/ubuntu/environment/checker/src/lambda.d/checker/index.ts --target=node14 --platform=node --outfile=/home/ubuntu/environment/checker/cdk.out/bundling-temp-a5c74f113b8c87a1a34f41dde7ae72eba852d1bccfbaa6b6573360a5e136168d/index.js --external:aws-sdk
    at checkExecSyncError (child_process.js:790:11)
    at Object.execFileSync (child_process.js:827:15)
    at Object.<anonymous> (/home/ubuntu/environment/checker/node_modules/esbuild/bin/esbuild:109:26)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
    at internal/main/run_main_module.js:17:47 {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 4825,
  stdout: null,
  stderr: null
}
error Command failed with exit code 1.

Any hint to resolve it?

@khrome
Copy link
Owner

khrome commented Feb 4, 2022

This is coming from canvas, which uses a native cairo binding.

I'll see if there's an update(one that may contain a resolution) before the next release, but I'm guessing it's related to this.

In the meantime, I would recommend excluding canvas from checking.

If this is a browser app, exclude canvas entirely as it will pick up the browser native one.

Additionally I'll leave this open until the underlying issue is solved and the dependency is upgraded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants