Closed chrisspiegl closed 1 year ago
I am trying to use unenv to get something to work with the use of rollup and in another project with nuxt.js
I found that the auto mocking proxy runs into issues when the requesting library tries to convert something to a primitive value as in this example:
file:///Users/.../_worker.js:107963 [http2$1.constants.HTTP2_HEADER_STATUS]: http2$1.constants.HTTP_STATUS_OK, ^ TypeError: Cannot convert object to primitive value
I had the same issue with a library doing something like this:
const sys = os.platform() if (sys && sys.length > 3) {}
In this case the auto mocking failed because the sys.length can't be provided as a primitive value.
sys.length
Not sure this can be somehow enhanced but I thought I'd share my findings here.
Hi. This is because node:https is not implemented. Moving issue to #92
node:https
Describe the feature
I am trying to use unenv to get something to work with the use of rollup and in another project with nuxt.js
I found that the auto mocking proxy runs into issues when the requesting library tries to convert something to a primitive value as in this example:
I had the same issue with a library doing something like this:
In this case the auto mocking failed because the
sys.length
can't be provided as a primitive value.Not sure this can be somehow enhanced but I thought I'd share my findings here.
Additional information