docusaurus-lunr-search Swizzle command fails
See original GitHub issue🐛 Bug Report
Docusaurus swizzle
command fails to copy the SearchBar to src/theme/SearchBar.
Fix
- Install this package
npm i docusaurus-lunr-search --save
- Then run
npm install
before the swizzle command to update, build, and link the packages. 2. Then run docusaurus swizzle
npm run swizzle docusaurus-lunr-search SearchBar -- --danger
The swizzle command works fine now.
To Reproduce
- Create a new Docusaurus Project (or migrate from an older one):
npx @docusaurus/init@latest initi my-website classic
- Install the latest Docusaurus Lunr search package:
npm i docusaurus-lunr-search --save
- Run the swizzle command:
npm run swizzle docusaurus-lunr-search SearchBar -- --danger
Runs into error.
Expected behavior
-
swizzle
success message: -
SearchBar copied in the right location:
Actual Behavior
Your Environment
- Docusaurus version used: 2.0.0-alpha.69
- Environment name and version (e.g. Chrome 78.0.3904.108, Node.js 10.17.0): v12.19.0
- Operating system and version (desktop or mobile): macOS Big Sur
Reproducible Demo
https://github.com/lelouch77/docusaurus-lunr-search.
If you skip this step, your site will not be enabled with the Lunr search box feature.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
docusaurus-lunr-search Swizzle command fails #3864 - GitHub
Docusaurus swizzle command fails to copy the SearchBar to src/theme/SearchBar. Have you read the Contributing Guidelines on issues? Yes. Fix.
Read more >Enable Docusaurus2 Lunr offline/local search | Medium
The swizzle command fails :-o !!! Or, yet there is no result when you start typing in the search box. The Solution. The...
Read more >docusaurus-lunr-search - npm
Start using docusaurus-lunr-search in your project by running `npm ... npm run swizzle docusaurus-lunr-search SearchBar -- --eject --danger.
Read more >Feedback | Docusaurus
However, after installing it, I couldn't get it to return any search results in ... it is because of my improper configuration, and...
Read more >How to solve Error: self signed certificate in certificate chain i ...
command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node get-sysinternals-du.js npm ERR! node:events ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Having similar issue, but instead, I get:
I’ve submitted #87