Code Monkey home page Code Monkey logo

Comments (22)

plouc avatar plouc commented on May 27, 2024 5

This fix has been released in v0.87.0.

from nivo.

GreenAsJade avatar GreenAsJade commented on May 27, 2024 4

Great news! Thanks!

from nivo.

GreenAsJade avatar GreenAsJade commented on May 27, 2024 3

Do you mean "adding all the optional props in the client code explicitly"? If so, that's not really a "solution" :)

from nivo.

GreenAsJade avatar GreenAsJade commented on May 27, 2024 2

Or - drop back to the previous version until the bug is fixed 😝

That's what I've done.

from nivo.

mswezey23 avatar mswezey23 commented on May 27, 2024 2

Damn... well... misery loves company and here we are <3

FML... I migrating from cra/craco to vite and updating all my libs in on shot was not ideal. This wasn't the only lib to break on update. Optimizely had to be downgraded and so did Playwright, both had regressions.

Gonna go back on this one too. PR is already big enough.

from nivo.

ryanmio avatar ryanmio commented on May 27, 2024 1

I am having this same issue. Been troubleshooting since yesterday and not found a good fix. I'll stay tuned here.

from nivo.

hilyas786786 avatar hilyas786786 commented on May 27, 2024 1

adding in all the props is the only way to get rid of the console warnings currently

from nivo.

GreenAsJade avatar GreenAsJade commented on May 27, 2024

^^ that's the likely cause.

from nivo.

hilyas786 avatar hilyas786 commented on May 27, 2024

having the same isssues

from nivo.

Evirtual avatar Evirtual commented on May 27, 2024

I can confirm that adding missing props solves the issue.

from nivo.

codeams avatar codeams commented on May 27, 2024

if you go back to the previous version you get back to get the "defaultProps" deprecated warning (depending on your version of react).

from nivo.

codeams avatar codeams commented on May 27, 2024

what could I set as "tooltip" and "sliceTooltip" props to get rid of their warnings without affecting the behavior of the line chart component?

from nivo.

m3360202 avatar m3360202 commented on May 27, 2024

dude,i've resolve this problem by update nodejs to version 18.0.0 above, i use 18.2.0 now,and this function can render svg/canvas components normally

from nivo.

m3360202 avatar m3360202 commented on May 27, 2024

it seems that nodejs 17 may trigger this multiple errors

from nivo.

hilyas786786 avatar hilyas786786 commented on May 27, 2024

im using node js 21, still get the same console.log warnings

from nivo.

qm210 avatar qm210 commented on May 27, 2024

Same.

Can this be interpreted - no offense please - as "the devs do not really use this project themselves (anymore)"? Which can happen everywhere, but in that case, a deprecation warning on the front page would be nice, I guess.

from nivo.

Ojay avatar Ojay commented on May 27, 2024

I'm also experiencing this with @nivo/line 0.85.1 - node V20.11.

Downgrading to @nivo0.84.0 removed a ton of warnings, but introduced the Support for defaultProps error that @codeams mentioned.

from nivo.

nikitadubyk avatar nikitadubyk commented on May 27, 2024

I'm also experiencing this with @nivo/line 0.85.1 - node V20.11.

Downgrading to @nivo0.84.0 removed a ton of warnings, but introduced the Support for defaultProps error that @codeams mentioned.

Same issue

from nivo.

Magdan4ik avatar Magdan4ik commented on May 27, 2024

The same issue here with node 20.11 & @nivo/line 0.85.1.
Any updates?

from nivo.

codeams avatar codeams commented on May 27, 2024

As the project I'm working on uses TS I suppressed warnings using a hook:

import { useEffect } from 'react'

const useSuppressConsoleWarnings = () => {
  useEffect(() => {
    const originalConsoleWarn = console.error

    console.error = (message, ...args) => {
      if (
        message.includes('Warning: Failed %s type: %s%s')
      ) {
        return
      }
      originalConsoleWarn(message, ...args)
    }

    return () => {
      // Restore original console.error on cleanup
      console.error = originalConsoleWarn
    }
  }, [])
}

export default useSuppressConsoleWarnings

It uses useEffect to ensure the warning is supresed in the client in case you're using server components.

You can bring this hook into components that use @nivo/line.

Hopefully this is resolved soon, but if you take a look at nivo projects in github, you'll notice the intention to move @nivo/line to TS has been open for more than a couple of years. It doesn't seem simple so I don't think this will be resolved in the short term.

Downgrading the react/node version is not a satisfactory solution, as warnings of "defaultProps" being deprecated might appear instead. In fact, the attempt to solve this deprecation warning is what triggered this even more annoying issue.

from nivo.

GreenAsJade avatar GreenAsJade commented on May 27, 2024

Thanks for sharing that. We'll stick on 0.84 till something compelling makes us move, but that's handy to know.

from nivo.

mib00038 avatar mib00038 commented on May 27, 2024

Unfortunately, 0.84 contains multiple high severity ReDoS vulnerabilities related to the d3-color dependency.

from nivo.

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.