Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch typed-html@3.0.1 for the project I'm working on.
When running vite to build, I got this error from esbuild :
[commonjs--resolver] Failed to resolve entry for package "typed-html". The package may have incorrect main/module/exports specified in its package.json.
This is because the module line does not have the correct path in package.json.
Here is the diff that solved my problem:
diff --git a/node_modules/typed-html/package.json b/node_modules/typed-html/package.json
index cd4e..beab 100644
--- a/node_modules/typed-html/package.json
+++ b/node_modules/typed-html/package.json
@@ -3,7 +3,7 @@
"version": "3.0.1",
"description": "TypeSafe HTML templates using TypeScript. No need to learn a template library.",
"main": "dist/src/elements.js",
- "module": "dist/esm/elements.js",
+ "module": "dist/esm/src/elements.js",
"repository": {
"type": "git",
"url": "https://github.com/nicojs/typed-html"
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
typed-html@3.0.1
for the project I'm working on.When running vite to build, I got this error from esbuild :
This is because the
module
line does not have the correct path in package.json.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.