wonka
wonka copied to clipboard
Newer versions of node can't use Wonka
Some of the newest versions of NPM require the package.json's exports to include wonka.bs.js . Sorry, I'm not providing a lot of detail right now, just wanted to write this down before I forgot.
Specifically, Node version 12.14.1 can use Wonka from ReasonML without any errors, but upgrading to 12.19.0 aborts with an error that "./src/Wonka.bs.js" isn't listed in the package's exports.
I've applied this patch locally to fix for now using patch-package:
diff --git a/node_modules/wonka/package.json b/node_modules/wonka/package.json
index 63c402e..08a5d0d 100644
--- a/node_modules/wonka/package.json
+++ b/node_modules/wonka/package.json
@@ -80,6 +84,7 @@
"types": "./dist/types/src/Wonka.d.ts",
"source": "./src/Wonka.ts"
},
+ "./src/Wonka.bs.js": "./src/Wonka.bs.js",
"./package.json": "./package.json"
},
"files": [