๐ Missing 'dist/modal.esm.js' in package
s-weigand opened this issue ยท 2 comments
s-weigand commented
First of all thanks for the awesome package, it makes opening dialogs a whole lot easier โค๏ธ
I just installed your package and got this error:
'./dist/modal.esm.js' does not exist, did you mean './dist/index.js'?'
Locally I hot fixed the issue by removing the "module"
line from package.json
in your installed package.
- "module": "dist/modal.esm.js",
"main": "dist/index.js",
Looking at the tree of the installfolder
tree node_modules/mui-modal-provider
node_modules/mui-modal-provider
โโโ LICENSE
โโโ README.md
โโโ dist
โ โโโ ModalContext.d.ts
โ โโโ ModalProvider.d.ts
โ โโโ constants.d.ts
โ โโโ index.d.ts
โ โโโ index.js
โ โโโ mui-modal-provider.cjs.development.js
โ โโโ mui-modal-provider.cjs.development.js.map
โ โโโ mui-modal-provider.cjs.production.min.js
โ โโโ mui-modal-provider.cjs.production.min.js.map
โ โโโ mui-modal-provider.esm.js
โ โโโ mui-modal-provider.esm.js.map
โ โโโ reducer.d.ts
โ โโโ test-utils
โ โ โโโ LegacyModal.d.ts
โ โ โโโ Modal.d.ts
โ โ โโโ index.d.ts
โ โโโ types.d.ts
โ โโโ useModal.d.ts
โ โโโ utils.d.ts
โโโ package.json
I guess this line should be changed into (tested works)
- "module": "dist/modal.esm.js",
+ "module": "dist/mui-modal-provider.esm.js",
Quernest commented
Hi @s-weigand, thank you!
I just published a new version of the package, can you check it out?
s-weigand commented
Awesome thanks for the quick fix, it works like a charm ๐