I updated refinedev and suddenly project breaks 'prism-react-renderer/themes/vsDark'
I updated refinedev and suddenly project breaks 'prism-react-renderer/themes/vsDark' in 'node_modules@refinedev\inferencer\dist'. Any ideas?
17 Replies
Hi @BadWolf. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Hmm, I don't know enough to give you a confident answer yet. The knowledge sources provided do not contain information about the specific issue you're encountering with 'prism-react-renderer/themes/vsDark' in 'node_modules@refinedev\inferencer\dist' after updating refinedev.
However, it's worth noting that issues with dependencies or packages after updates can often be resolved by reinstalling the problematic package or checking its compatibility with the updated version of refinedev.
For more detailed help, I recommend checking the Refine GitHub Issues (https://github.com/refinedev/refine/issues) for similar problems or posting your issue there for assistance.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
<@833762644170113066> kapa.ai is still learning and improving, please let us know how it did by reacting below
flat-fuchsia•10mo ago
Hey @BadWolf can you share the full error message?
deep-jadeOP•10mo ago
Module not found: Error: Can't resolve 'prism-react-renderer/themes/vsDark' in 'C:\Users\omrih\Documents\TaxRay\taxray_demo_poc\taxray-demo-poc\node_modules@refinedev\inferencer\dist'
Did you mean 'index.js'?
BREAKING CHANGE: The request 'prism-react-renderer/themes/vsDark' 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.
I updated the inferencer
What happened is that I updated 4.44.7 -> 4.49.0, @refinedev/inferencer
And then it broke
flat-fuchsia•10mo ago
We have updated some configurations related to ESM and CJS, we didnt encounter this issue in tests or in development but i will check again to verify this issue.
Let me get back to you and maybe we can come up with a quick fix for this
deep-jadeOP•10mo ago
Should there be prism-react-renderer in inferencer folder?
Maybe it was once, and now it's gone -> maybe I need to delete the references from the package-lock.json?
flat-fuchsia•10mo ago
Not in the inferencer folder but there should be a
prism-react-renderer
package in your node_modules
, you don't need to worry about it I guess, it should be handled by the package manager.
Can you open up an issue at Github? You can tag me there as well 🙏deep-jadeOP•10mo ago
I can
Please help, its urgent 🥹
What Github URL?
flat-fuchsia•10mo ago
GitHub
GitHub - refinedev/refine: A React Framework for building internal...
A React Framework for building internal tools, admin panels, dashboards & B2B apps with unmatched flexibility. - refinedev/refine
deep-jadeOP•10mo ago
GitHub
I updated refinedev and refinedev/inferencer and suddenly project b...
Describe the bug I just updated the following packages @refinedev/appwrite 6.4.4 -> 6.4.8, @refinedev/cli 2.16.14 ->2.16.29, @refinedev/kbar 1.3.4 -> 1.3.8, @refinedev/react-router-v6 4.5....
deep-jadeOP•10mo ago
By the way I now see that the header of the error message, says this :
"ERROR in ./node_modules/@refinedev/inferencer/dist/antd.mjs 418:0-52"
deep-jadeOP•10mo ago
@aliemir
deep-jadeOP•10mo ago
Any news? 🙏
@aliemir
@aliemir Sorry to bother again, just checking to see if there's any update? It is really super urgent to me 🙏
flat-fuchsia•10mo ago
Just opened a PR for the fix. I'll continue updating the issue when we have it released in Github
deep-jadeOP•10mo ago
Dude
You're fast!!
Thank you
Waiting on your update
What's the ETA you think?
@aliemir I saw that you added the fix to May release? can you please help me solve it locally in the meantime? I have to release something by the end of day and I can't continue 😔
flat-fuchsia•10mo ago
Hey @BadWolf, I cannot promise a quick release for this PR. I'll talk with the other members of the team to decide.
While this is waiting for a release, you can use the
patch-package
package to manually update the broken import in your local.
Check out their docs here https://github.com/ds300/patch-package#readme
To fix the import issue, you need to change the prism-react-renderer/themes/vsDark
import with prism-react-renderer/themes/vsDark/index.js
in the
node_modules/@refinedev/inferencer/dist/antd.mjs
then you can use patch-package
to make it automated for next installs.deep-jadeOP•10mo ago
Okay, so I installed patch-package to the project
Now
What should I do?
Should I manually go to node_modules/@refinedev/inferencer/dist/antd.mjs?
Okay so I changed prism-react-renderer/themes/vsDark import with prism-react-renderer/themes/vsDark/index.js in the
node_modules/@refinedev/inferencer/dist/antd.mjs
and I saved
Now I should use patch-package?
The command I should run now is
"npx patch-package node_modules/@refinedev/inferencer/dist/antd.mjs?
@aliemir