Giter Site home page Giter Site logo

Comments (7)

simplenotezy avatar simplenotezy commented on May 14, 2024 2

Thanks a lot @peterpeterparker - great work!

from gatsby-remark-highlight-code.

DylanLacey avatar DylanLacey commented on May 14, 2024 1

**1: **
This generates an ERR! not just a WARN:

npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/gatsby
npm ERR!   gatsby@"^4.4.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer gatsby@"^3.0.0" from [email protected]
npm ERR! node_modules/gatsby-remark-highlight-code
npm ERR!   gatsby-remark-highlight-code@"^3.1.0" from the root project

2:
I was able to get my site up and running by adding an override to my package.json:

  "overrides": {
    "gatsby-remark-highlight-code": {
      "gatsby": "4.4.0"
    }
  }

That implies to me that there aren't any breaking changes, but I'm no Gatsby expert.

For anyone reading this bug: This is a terrible idea. Don't do this. Wait until it's supported.

3:
Please see https://github.com/DylanLacey/gatsby-remark-code-4 for a minimal repro; Just run npm install.

from gatsby-remark-highlight-code.

peterpeterparker avatar peterpeterparker commented on May 14, 2024 1

Awesome, thanks a lot @DylanLacey 🙏

Did a quick try with your repo (including writing some code in a .mdx file), the plugin is also compatible with Gatsby v4.
Therefore I just added the new peerDependencies in addition to the existing support of v3 in package.json.

This has been released to npm in version v3.2.0.

npm rm gatsby-remark-highlight-code && npm i gatsby-remark-highlight-code

If anyone notice issue with Gatsby v4, please let me know.

from gatsby-remark-highlight-code.

peterpeterparker avatar peterpeterparker commented on May 14, 2024

Have you try cleaning npm (rm package-lock.json && rm -r node_modules && npm i)?

I can give it a try if you provide a sample repo to reproduce the error but the issue does not seem to be related to this plugin code but rather something on your project end.

from gatsby-remark-highlight-code.

Veuge avatar Veuge commented on May 14, 2024

Same here, I'm having the warning

warn Plugin gatsby-remark-highlight-code is not compatible with your gatsby version 4.4.0 - It requires gatsby@^3.0.0

on package.json I have

"gatsby-remark-highlight-code": "^3.1.0",

from gatsby-remark-highlight-code.

peterpeterparker avatar peterpeterparker commented on May 14, 2024
  1. Is there any issue or is that "just" a warning?
  2. Should we "just" bump the minimal requirement from gatsby v3 to v4 or is there any breaking changes affecting the plugin?
  3. Can you provide a sample repo to reproduce the issue?

from gatsby-remark-highlight-code.

peterpeterparker avatar peterpeterparker commented on May 14, 2024

Migration guide from Gatbsy v3 to v4:

(notes to my self, on it)

from gatsby-remark-highlight-code.

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.