chrisa / node-dtrace-provider

Native DTrace probes for node.js apps
Other
321 stars 68 forks source link

ESBuild failed #135

Open CasperPas opened 1 month ago

CasperPas commented 1 month ago

When I use ESBuild with my project, it failed with the following error:

hospital/api % node build.js
✘ [ERROR] Could not resolve require("./src/build/**/*/DTraceProviderBindings")

    node_modules/dtrace-provider/dtrace-provider.js:18:26:
      18 │     var binding = require('./src/build/' + builds[i] + '/DTraceProviderBindings');
         ╵                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1 error
/workspaces/hospital/api/node_modules/esbuild/lib/main.js:1476
  let error = new Error(text);
              ^

Error: Build failed with 1 error:
node_modules/dtrace-provider/dtrace-provider.js:18:26: ERROR: Could not resolve require("./src/build/**/*/DTraceProviderBindings")
    at failureErrorWithLog (/workspaces/hospital/api/node_modules/esbuild/lib/main.js:1476:15)
    at /workspaces/hospital/api/node_modules/esbuild/lib/main.js:945:25
    at /workspaces/hospital/api/node_modules/esbuild/lib/main.js:897:52
    at buildResponseToResult (/workspaces/hospital/api/node_modules/esbuild/lib/main.js:943:7)
    at /workspaces/hospital/api/node_modules/esbuild/lib/main.js:970:16
    at responseCallbacks.<computed> (/workspaces/hospital/api/node_modules/esbuild/lib/main.js:622:9)
    at handleIncomingPacket (/workspaces/hospital/api/node_modules/esbuild/lib/main.js:677:12)
    at Socket.readFromStdout (/workspaces/hospital/api/node_modules/esbuild/lib/main.js:600:7)
    at Socket.emit (node:events:520:28)
    at addChunk (node:internal/streams/readable:559:12) {
  errors: [Getter/Setter],
  warnings: [Getter/Setter]
}

Node.js v22.8.0