mh15M
Convex Community8mo ago
3 replies
mh15

Installing `@swc/core` in Convex NodeJS Actions

I get these errors
  The package "assert" wasn't found on the file system but is built into node. Are you trying to
  bundle for node? You can use "platform: 'node'" to do that, which will remove this error.

✘ [ERROR] Could not resolve "@swc/wasm"

    ../../node_modules/.pnpm/@swc+core@1.12.0/node_modules/@swc/core/index.js:71:35:
      71 │         fallbackBindings = require("@swc/wasm");
         ╵                                    ~~~~~~~~~~~

  You can mark the path "@swc/wasm" as external to exclude it from the bundle, which will remove
  this error and leave the unresolved path in the bundle. You can also surround this "require" call
  with a try/catch block to handle this failure at run-time instead of bundle-time.


I've set up my convex.json to mark all packages as external, but no luck.
Was this page helpful?