milk enjoyerM
Convex Community3y ago
73 replies
milk enjoyer

Cannot resolve node packages even with "use node"

I have "use node" indicated in my actions file, and that is the only place in my entire code where I am using the Node APIs. However, I am getting these errors:
✘ [ERROR] Could not resolve "buffer"

    node_modules/safer-buffer/safer.js:5:21:
      5 │ var buffer = require('buffer')
        ╵                      ~~~~~~~~

  The package "buffer" 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 "string_decoder"

    node_modules/iconv-lite/encodings/internal.js:49:28:
      49 │ var StringDecoder = require('string_decoder').StringDecoder;
         ╵                             ~~~~~~~~~~~~~~~~

  The package "string_decoder" 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.
Was this page helpful?