-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
DocsPreferredVersionContextProvider error when launching page. #10
Comments
This is the config file for the docusaurus site
|
This is the
|
@Babilinski I've run into this issue once before when using I've reached out to the docusaurus team to see if they have any thoughts on this. |
Hi, this is very likely a dependency deduplicating problem. You have Could you try deleting node_modules and lock file and reinstalling? |
@Josh-Cena Thank you for that pointer about duplicate instances in the node_modules tree. I tried to clear node_modules and the lock file in both I then moved Side note: @Babilinski I've published this change in |
I suspect it's fine. It's indeed bad practice to rely on package hoisting, but we don't want the users to install Moving Is |
I see
|
I mean, it's certainly at the root (that's the default behavior of package managers), but it could also be non-deduped in |
By "it could also be non-deduped in If so, given that adding
Any particular reason we don't want users to do this? |
Because the fewer packages we ask users to install, the better :D I would need to inspect this later. |
Hello! I work with @Babilinski and can confirm that the above fix got our theme to work correctly. thanks so much! |
Just want to be sure what the workarounds for this are currently. It seems I could "fork" this project and modify some of its dependencies that should work with Are there any other thoughts/tricks I can do in my site's own package.json to get around this? |
Could people encountering this issue give their package manager? It could be due to differing behaviors between package managers. |
I was able to replicate the original issue with both yarn and npm. |
I'm using yarn Didn't notice that a pre-release I tried it just now, with Error from Browser Console
|
FYI, I saw |
I confirm, version 0.4.0-2 seems to fix the problem. I reproduced the bug with the previous versions. For information, if it helps, I use Yarn berry and workspaces. |
I have this problem now with 0.6.0 on Docusaurus 2.0.1 in dev mode (npm run start) from PowerShell 7 on Windows 11 (see attached screenshot for the error in the browser console). I'm using npm. When I comment-out theme 'docusaurus-theme-search-typesense' in docusaurus.config.json then there is no error, but also no search box. I have tried it by forcibly upgrading to Docusaurus 2.1.0, didn't change anything. Any suggestions? |
Could anyone please look into this and give a hint? I cannot make any progress understanding the root cause. |
@thgossler v0.6.0 worked fine for me on Docusaurus 2.0.1 when running locally... could you share a minimal Docusaurus project that replicates this issue? |
There are 3 minimal projects in the zip file.
In fact, it is now also working on 2.0.1 for me. Thanks, @jasonbosco, to point this out again! I guess I had messed around a bit too much during npm updates to latest. A clean update with the following commands from 1. to 2. was working.
But, then just executing the following update command in 2. leads to the mentioned error again. Should be reproducible by:
|
Thank you for putting that together. I just tried v0.6.0 of the typesense theme on docusaurus 2.1.0 and it seems to work fine for me. Here's the project: https://github.com/typesense/docusaurus-typesense-testground In any case, I've published |
Thanks! I will try it and let you know. |
Seems not to have helped. What I have tried:
Same error occurs. I believe it is not simply a dependency issue, it seems to be some incompatibility with the latest docusaurus version 2.1.0. |
Hmm, I tried it with the testground repo I have here and it works fine for me there: https://github.com/typesense/docusaurus-typesense-testground Could you try cloning that and running it locally? |
Yes, this works, but not in context of my project. I have no idea what could cause this problem in my project, see my note above with the attached ZIP file which can be used to reproduce the error. Any hint would be highly appreciated! |
Description
Docusaurus site versions 2.0.0-beta.16 and 2.0.0-beta.15 do not work with the typesense search plugin. Starting page after configuring the website results in the following error .
Steps to reproduce
After creating a new docusaurus site using the command on their getting started page:
Adding
"docusaurus-theme-search-typesense": "^0.3.0",
to the dependencies section in thepackage.json
fileInstalling the plugin using
and configuring my
config.js
file I launch my website usingnpm run start
and see the following errorExpected Behavior
Website should load and search bar should be present.
Actual Behavior
Website crashes
Metadata
Typsense Version: docusaurus-theme-search-typesense": "^0.3.0"
OS: Windows and Mac
The text was updated successfully, but these errors were encountered: