Comments (3)
@HazyFish - You are probably using NPM 7. NPM 7 has a little bit different behavior when it comes to child peer dependencies - NPM 6 would warn you if you did not have a matching version of a peer dependency installed. NPM 7 will try and install peer dependencies.
The easiest fix is to force NPM to act like NPM 6.
You can do that by adding a single line to your .npmrc file -
legacy-peer-deps=true
from docusaurus-lunr-search.
Mine is working with the following package.json configuration. I'm on the latest beta version (2.0.0-beta.4)
{
"name": "dev-docs",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "2.0.0-beta.4",
"@docusaurus/preset-classic": "2.0.0-beta.4",
"@mdx-js/react": "^1.6.21",
"@svgr/webpack": "^5.5.0",
"clsx": "^1.1.1",
"docusaurus-lunr-search": "^2.1.14",
"file-loader": "^6.2.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"url-loader": "^4.1.1"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
from docusaurus-lunr-search.
@HazyFish - You are probably using NPM 7. NPM 7 has a little bit different behavior when it comes to child peer dependencies - NPM 6 would warn you if you did not have a matching version of a peer dependency installed. NPM 7 will try and install peer dependencies.
The easiest fix is to force NPM to act like NPM 6.
You can do that by adding a single line to your .npmrc file -
legacy-peer-deps=true
Thanks for the workaround! I think I can keep this issue open to track the dependency update progress.
from docusaurus-lunr-search.
Related Issues (20)
- [ERROR] Error: "baseUrl" is required HOT 1
- Search is in disabled mode HOT 1
- Search crawler not working after adding authentication in to my docs HOT 4
- Feature: add includeRoutes array HOT 2
- Set queryType: 'prefixAll'
- Help adjusting stopwords HOT 2
- v2.4.0 breaking changes when using github actions to build HOT 2
- 'removeDefaultStemmer' not work
- Feature Request: "Federated search" - Indexing and search across multiple Docusaurus builds HOT 1
- bug in html striping
- [issue]: lunr-search doesn't pickup on heading elements that are non-direct children of '.markdown' HOT 3
- [Feature Request] Highlight matched line after search HOT 2
- [Feature request] filters
- Documents aren't indexed when root is swizzled to add an authentication HOT 4
- Provide a configuration to specify baseUrl or path to generated Search/Lunr JSON files HOT 3
- Support docusaurus 3 HOT 1
- How do I import this search component to use on a custom index/home page? HOT 1
- Confusing install instructions in README HOT 2
- Is there a way to exclude ### level headers from the search? HOT 1
- Demo site linked in README is down
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docusaurus-lunr-search.