assertive-ts icon indicating copy to clipboard operation
assertive-ts copied to clipboard

Browser support?

Open asimpletune opened this issue 1 year ago • 0 comments

Hi folks, I'm having some trouble running assertive-ts/core in a browser environment. I thought this was possible but maybe I'm misunderstanding something?

This library is designed to work in the browser and in Node.js.

I'm trying to use this in a Cloudflare Worker, which is a v8 environment, but when I test locally I receive this error

✘ [ERROR] Build failed with 2 errors:

✘ [ERROR] Could not resolve "assert/strict"

node_modules/@assertive-ts/core/dist/index.js:11:23:
   11 │ var strict_1 = require("assert/strict");

Which seems like a dependency on node's assert... although I'm probably mistaken about this.

In any case, could somebody potentially lend a hand and explain how the library is meant to be used in a browser? thanks!

asimpletune avatar Feb 12 '25 23:02 asimpletune