Closed EGo14T closed 2 years ago
Oh whoops, I thought I fixed that in #73 but I now see it wasn't fully patched. Will take a look at it tomorrow morning.
Thank you so much for the report! ❤️
Looks like I lost a commit somewhere along the way, I'll recreate it and try to fix it as soon as I have time
Thanks ~ 😁
I currently don't have a windows machine available to test, but I'll be able to get something done start of next week
I've published 6.0.0-rc4 (should be available on npm shortly). Please give it another try (and note that the package is esm-only now)
I use league-connect/example to test, I thought it be solved; But I can't use v6-rc4 (esm-only) in my electron program very well, looks like #29657
I see, I'll see if there's something electron can do, otherwise I'll dual publish esm and commonjs
I've published 6.0.0-rc5
which bundles both CommonJS and ESM, could you give this a try?
ummmm, when I use v6-rc5 in my program, it threws an error
App threw an error during load
Error [ERR_REQUIRE_ESM]: require() of ES Module D:\Demo\node_modules\node-fetch\src\index.js from D:\Demo\node_modules\league-connect\dist\index.cjs not supported.
Instead change the require of index.js in D:\Demo\node_modules\league-connect\dist\index.cjs to a dynamic import() which is available in all CommonJS modules.
at Object.require.extensions.<computed> [as .js] (D:\Demo\node_modules\ts-node\dist\index.js:785:20)
at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
at Function.Module._load (D:\Demo\node_modules\runtime-required\runtime-required.js:34:23)
at Object.<anonymous> (D:\Demo\node_modules\league-connect\dist\index.cjs:417:33)
at Object.require.extensions.<computed> [as .js] (D:\Demo\node_modules\ts-node\dist\index.js:785:20)
at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
at Function.Module._load (D:\Demo\node_modules\runtime-required\runtime-required.js:34:23)
at Object.<anonymous> (D:\Demo\src\main\main.ts:17:26)
at Module.m._compile (D:\Demo\node_modules\ts-node\dist\index.js:791:29)
at Object.require.extensions.<computed> [as .ts] (D:\Demo\node_modules\ts-node\dist\index.js:793:16)
at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
at Function.Module._load (D:\Demo\node_modules\runtime-required\runtime-required.js:34:23)
at loadApplicationPackage (D:\Demo\node_modules\electron\dist\resources\default_app.asar\main.js:110:16)
at Object.<anonymous> (D:\Demo\node_modules\electron\dist\resources\default_app.asar\main.js:222:9)
at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
at Object.<anonymous> (node:electron/js2c/browser_init:185:3104)
at Object../lib/browser/init.ts (node:electron/js2c/browser_init:185:3308)
at __webpack_require__ (node:electron/js2c/browser_init:1:128)
at node:electron/js2c/browser_init:1:1200
at node:electron/js2c/browser_init:1:1267
at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
Strange, will investigate
Found the problem, I recently upgraded to node-fetch 3.x which is ESM-only but I've reverted it to 2.x which is require() compatible. Can you try to download 6.0.0-rc6
?
If the issue still persists, please open a new issue
It‘s all right now! Thank you so much!😊
Package Version: 6.0.0-rc3 Node: v16.14 Electron: 18.2.3
When I use this api, without body or body: undefined,
This error will appear in the program
If response has no content ,this error will happen