typesense / typesense/docusaurus-theme-search-typesense

Can't resolve '../../client' error after swizzling SearchBar

Open
#25 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
84
Forks
24
Avg merge
1m
Merged PRs (30d)
1

Description

Description

When I try to swizzle the docusaurus-theme-search-typesense SearchBar component it fails to compile docusaurus with an error.

Steps to reproduce

  1. Run yarn run swizzle docusaurus-theme-search-typesense SearchBar
  2. Select the 'Eject' option
  3. Run yarn start

Expected Behavior

Local Docusaurus will start without error with a copied version of the typesense searchbar as it was previously

Actual Behavior

Docusaurus launches with an error:

Compiled with problems:X

ERROR in ./src/theme/SearchBar/index.js 7:143-199

Module not found: Error: Can't resolve '../../client' in '<redacted>\content\src\theme\SearchBar'

Metadata

docusaurus/core: 2.2.0
docusaurus-theme-search-typesense: 0.8.0

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with yarn run swizzle docusaurus-theme-search-typesense SearchBar, choose Eject, and run yarn start. Start at src/theme/SearchBar/index.js and inspect the failing ../../client resolution; done means the ejected SearchBar compiles and local Docusaurus starts without the module-not-found error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.