-
-
Notifications
You must be signed in to change notification settings - Fork 370
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
[BUG] Cannot load file './index' from module "xxx" #774
Comments
I get a similar error after I run "plasmo dev": Plasmo v0.83.0 I figure the internal bundling process cannot find the npm package, so I explicitly added this package dependency. The package.json now contains it, as well as the node_modules directory. This did not help at all! |
https://github.com/remarkjs/react-markdown/blob/main/package.json https://github.com/TBD54566975/dwn-sdk-js/blob/main/package.json This is related to the parcel package resolver in the current version - it's not resolving these ESM packages properly because their package.json is an edge case (their exports property does not expose all files). |
Is there a way to modify the package.json to expose all files or downgrade the parcel package resolver? I have been running into this issue with many packages such as |
My problem was fixed by referencing the index.js file in the node_module directly e.g. |
I'm using wxt now. |
I am also getting the same issue with
I have tried importing the
Would like to get this working somehow as there aren't many good alternatives out there for rendering markdown Thanks! |
I've been looking at this issue for a whole day, and I feel like I have a good understanding of it.
This issue has been troubling me for a long time. The eventual solution was to directly reference the bundled JS file like this: when parsing code, such as ```python, it can be parsed correctly。I hope this can be helpful to you all |
Hi munjyong, |
Could you explain it in more detail? I went your way and it didn't work out . what's the |
This is a building package. You can clone |
I'm also getting the following error while using
|
@GorvGoyl That PR has been in limbo for a while because I have not been able to find time to redo it xd.... Def need help on that one |
same issue with @hzeyuan I understand why 9.x not working, but in react-markdown 8.x it use main rather than exports any idea on this? @louisgv more infomation:
when i run it works. I suspect after i change the code, there are some cache has been override. But at the first time build, |
What happened?
When I use react-markdown, it gives me the error message:
https://github.com/remarkjs/react-markdown
Other packages will also show this error, for example:
openai-streams
https://github.com/SpellcraftAI/openai-streams
Version
Latest
What OS are you seeing the problem on?
MacOSX
What browsers are you seeing the problem on?
Chrome
Relevant log output
No response
(OPTIONAL) Contribution
Code of Conduct
The text was updated successfully, but these errors were encountered: