Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to resolve path to module '@nivo/pie'

I'm trying to use Nivo Pie Chart, it's giving me this error on import:

Unable to resolve path to module '@nivo/pie'

import { ResponsivePie } from '@nivo/pie';

Trying to figure out what needs to be installed, any help appreciated.

like image 507
Afaq Ahmed Khan Avatar asked Oct 20 '25 03:10

Afaq Ahmed Khan


2 Answers

You need to install first yarn add @nivo/core, from the documentation:

In order to use nivo, you have to install the @nivo/core package and then choose some of the scoped @nivo packages according to the charts you wish to use: https://github.com/plouc/nivo#installation

like image 59
Alan Avatar answered Oct 21 '25 20:10

Alan


You should install package before using it. Please try running

yarn add @nivo/pie

or

npm install @nivo/pie --save
like image 31
Umair Farooq Avatar answered Oct 21 '25 18:10

Umair Farooq



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!