Git Product home page Git Product logo

Comments (3)

beolson avatar beolson commented on May 24, 2024 2

@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.

danielvlla avatar danielvlla commented on May 24, 2024

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 avatar HazyFish commented on May 24, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.