question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't upgrade v2 from alpha.55 -> alpha.61 -Can't resolve 'docsearch.js'

See original GitHub issue

šŸ› Bug Report

Thank you for docusaurus and Version 2 is already incredible.

I am trying to upgrade from alpha.55 to version alpha.61. I can’t tell what I am doing wrong but I am getting an error

Failed to compile
./src/theme/SearchBar/index.js
Module not found: Can't resolve 'docsearch.js' in '/Users/david/repos/erxes/docs/src/theme/SearchBar'

Have you read the Contributing Guidelines on issues?

Yes, I have read this.

To Reproduce

  1. In my package.json, under the dependences, change from version alpha.55, to version alpha.61
   "@docusaurus/core": "^2.0.0-alpha.61",
    "@docusaurus/preset-classic": "^2.0.0-alpha.61",
  1. In the terminal, in the directory for ā€œ/docsā€, run yarn install to install upgraded version
  2. Then run yarn start

Expected behavior

I expected to have my installation work in the browser, and to be able to continue developing my app.

Actual Behavior

Something went wrong:

  1. I got a bunch of warnings- but I don’t think this is the cause. Screen Shot 2020-08-13 at 18 55 40

  2. I ran yarn start. I got an error ValidationError: "homePageId" is not allowed to be empty

Screen Shot 2020-08-13 at 18 57 55

So, in the docusaurus.config.js, I commented out homepageId <-- which was in empty quotes. (I have no idea what to put in there, I tried ā€˜docs/’. Either way I am able to continue with the installation. I tried with and without docs/ (See below)

  1. I ran yarn start again. I got a reasonable error message, ValidationError: themeConfig.navbar.links has been renamed as themeConfig.navbar.items

Screen Shot 2020-08-13 at 19 02 29

So, in the docusaurus.config.js, I changed themeConfig.navbar.links to themeConfig.navbar.items.

  1. I ran yarn start again. I got an error ValidationError: "navbar.items[0].activeBasePath" is not allowed to be empty

Screen Shot 2020-08-13 at 19 08 06

I had two .items with activeBasePath, both were empty string quotes, and I commented both of them out.

  1. I ran yarn start again. This time it seemed to run, but I got the following errors, in my terminal:

Screen Shot 2020-08-13 at 19 11 54

The same error in my browser,

Failed to compile
./src/theme/SearchBar/index.js
Module not found: Can't resolve 'docsearch.js' in '/Users/david/repos/erxes/docs/src/theme/SearchBar' 

Note:

  • Everything was working great before the upgrade, but I wanted to upgrade
  • I have done the above steps 5 times with exactly the same results
  • I searched the docs, github and google and cannot find any reference to this issue. I suspect this is something I am doing wrong, and not necessarily a docusaurus issue.

Your Environment

  • Docusaurus version used: upgrading from version 2 alpha.55 to alpha.61
  • Environment name and version (e.g. Chrome 78.0.3904.108, Node.js 10.17.0): on a Mac with latest Node

Reproducible Demo

This is the link to the repo with the above issue.

https://github.com/erxes/erxes/tree/docusaurus-upgrade-error

(Note: It is part of a larger mono-repo for erxes.)

Thank you.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
anshulrgoyalcommented, Aug 13, 2020

@davidkartuzinski New release contains an update to algolia search plugin and due to your website swizzles searchBar it is broken.

0reactions
davidkartuzinskicommented, Aug 17, 2020

@anshulrgoyal - No problem about the errors! They makes sense. I understand this is alpha, and it is already so polished with in terminal messages and instructions! So great. I consider this issue my ignorance, not anything ā€œwrongā€ with docusaurus.

Your instructions helped me to understand what was happening. What I did to fix this issue was to go into the node_modules/@docusaurus/ and delete the @docusaurus/theme-search-algolia, then at the terminal I just simply ran yarn add @docusaurus/theme-search-algolia and everything now works.

Again thank you for your incredibly fast response. This issue is resolved for me.

I wanted to add that simply removing it didn’t fix the issue. Also simply just installing it didn’t work either. I had to delete it from the. node_modules, and then reinstall it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

vitepress | Yarn - Package Manager
VitePress is VuePress' spiritual successor, built on top of vite. Currently, it's in the alpha stage. It is already suitable for out-of-the-box documentationĀ ......
Read more >
Read the Docs Documentation
Read the Docs simplifies software documentation by building, versioning, and hosting of your docs, automatically.
Read more >
mui/material/CHANGELOG.md - UNPKG
286, ### `@mui/lab@5.0.0-alpha.61` ... 14 -->[examples] Fix lint issue for displayName missing in the Next.js ... 666, ### `@mui/base@5.0.0-alpha.55`.
Read more >
Untitled
Activities boston area, #Nslookup mx query online, Darksiders 2 armor skyrim. ... Kaderim sensin ferman sozleri, James gillespie facebook, O plus alpha,Ā ...
Read more >
node_modules/@mui/base/CHANGELOG.md ... - GitLab
[Autocomplete][material] Fix value overflow when disableClearable is used (#34053) @mnajdova ... [core] Update Node.js to 14 on CircleCI, CodeSandbox,Ā ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found