Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove type:module from package.json #75

Open
Tuditi opened this issue Sep 8, 2023 · 0 comments
Open

Remove type:module from package.json #75

Tuditi opened this issue Sep 8, 2023 · 0 comments

Comments

@Tuditi
Copy link

Tuditi commented Sep 8, 2023

Hi! 👋

Firstly, thanks for your work on this project! 🙂

I used patch-package to patch [email protected] for the project I'm working on.

Otherwise I get the following issue when building an electron-based app with webpack:

ERROR in ../../node_modules/svelte-markdown/src/markdown-parser.js 3:0-25:20
Module not found: Error: Can't resolve './renderers' in '/home/tuditi/bloom-labs/bloom/node_modules/svelte-markdown/src'
Did you mean 'index.js'?
BREAKING CHANGE: The request './renderers' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

Here is the diff that solved my problem:

diff --git a/node_modules/svelte-markdown/package.json b/node_modules/svelte-markdown/package.json
index fda9d18..1ff9e90 100644
--- a/node_modules/svelte-markdown/package.json
+++ b/node_modules/svelte-markdown/package.json
@@ -6,7 +6,6 @@
   "module": "dist/sveltemarkdown.es.js",
   "jsnext:main": "dist/sveltemarkdown.es.js",
   "svelte": "src/index.js",
-  "type": "module",
   "files": [
     "dist",
     "src",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant