-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
Swizzling ReactLiveScope does not work #3466
Comments
Hi Will be back from holidays on Monday 28. Will check new issues when I'm back. Afaik we already have an issue where swizzling fails to override original comp. In the meantime give a try to patch-package |
I wasn't able to reproduce Wouldn't be surprised if it was a Windows related bug, unfortunately I don't have windows 😅 As a workaround you can just copy the folder |
Then you may close the issue. Thank you for the response. |
Even if there's a valid workaround, I'd like to confirm if someone can reproduce this bug on Windows before closing ;) |
I have the same in MacOS:
|
If the scopes can be passed to the CodeBlock as a prop, I think it would be very helpful and most people would not need swizzling the component. |
Does anyone has an open-source site repro on github to see if it's a problem on your site? As it works on my computer it's hard to debug this problem. Edit: we might have one thanks to #3487 |
@arifszn I don't understand what you mean by that, how would you pass the scopes to the CodeBlock exactly? |
It was a suggestion if it is possible. Haven't looked at the code actually. I used the original react live as i didn't know how to swizzle manually. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
It seems our fault is that when we release new packages we do not mark them as Thus, if we execute
Therefore, to get the actual version (in which @arifszn could you please install the next (.66) version of |
@lex111 I noticed this as well. After installing |
@SeanGroff this is strange, can you please provide steps to reproduce or even better demo repo? |
@lex111 I'm currently using a Mac using Node v14.15.0 |
@SeanGroff thanks, Please try two options:
UPD: I know there is misleading output in the current version of swizzle command, but we fixed that in ##3725 |
In order to reduce staled issues, I am closing this issue, but feel free to open it again if needed. |
🐛 Bug Report
I am having problem in swizzling the react-live scope. I have installed a fresh project with @docusaurus/theme-live-codeblock installed just to be sure but same error occurs.
Have you read the Contributing Guidelines on issues?
Yes
To Reproduce
npm install --save @docusaurus/theme-live-codeblock
docusaurus.config.js
npm run swizzle @docusaurus/theme-live-codeblock ReactLiveScope
Expected behavior
swizzle the react-live scope and create a file src/theme/ReactLiveScope/index.js
Actual Behavior
Component "ReactLiveScope" doesn't exists. "ReactLiveScope" is swizzled instead of "ReactLiveScope". Error: Component ReactLiveScope not found.No component to swizzle
Your Environment
Reproducible Demo
The text was updated successfully, but these errors were encountered: