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.

[Bug] Error: Can't resolve '@theme/hooks/useDocs'

See original GitHub issue

Please describe the bug you are seeing

Can’t build with canary using this plugin. Looks like useDocs has been replaced by @docusaurus/plugin-content-docs/client.

https://github.com/facebook/docusaurus/pull/6287

How can we best reproduce the bug?

No response

Which version of Docusaurus and @cmfcmf/docusaurus-search-local are you using?

@cmfcmf/docusaurus-search-local@0.9.4 @docusaurus/core@0.0.0-4470

Which Node.js version are you using?

v16.13.2

Which theme are you using?

Yes, I am using @docusaurus/theme-classic

How does your plugin config look like?

require.resolve(“@cmfcmf/docusaurus-search-local”), { indexDocs: true, indexBlog: false, indexPages: true, language: “en” }

Additional context

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
cmfcmfcommented, Jan 28, 2022

Fixed in v0.10.0.

1reaction
pklaschkacommented, Jan 27, 2022

I can confirm this. It breaks when updating @docusaurus/preset-classic from 2.0.0-beta.14 to 2.0.0-beta.15.

According to their changelog, the hooks were moved from @theme/hooks to @docusaurus/theme-common:

docusaurus-theme-classic, docusaurus-theme-common, docusaurus-theme-live-codeblock, docusaurus-theme-search-algolia #6289 refactor: move @theme/hooks to @docusaurus/theme-common

(linking to https://github.com/facebook/docusaurus/pull/6289)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Module not found: Can't resolve '@theme/hooks/useDocs' #26
Bug description An error occurred: Module not found: Can't resolve '@theme/hooks/useDocs' after running yarn build.
Read more >
Theme hook not found [#2464459] | Drupal.org
The only error I see in the log is "Theme hook not found". Has anyone. ... Normal. Category: Bug report. Assigned: Unassigned. Reporter:....
Read more >
Bug List - Bugs - Eclipse
IllegalStateException: Can't overwrite cause, 2022-06-09 ... SDO 2.1.1 TCK - Need to be able to resolve schema location against base location containing jar ......
Read more >
Your Site Is Experiencing A Technical Issue - WordPress.org
Looking at the error details, this usually happens when the plugin files are cached and some old files are still used after updating...
Read more >
Ask Question - Stack Overflow
Your webpack configuration is outside src , thus your alias is incorrect: resolve: { alias: { '../../theme.config$': path.join(__dirname, ...
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