Znoy
Znoy

Reputation: 107

You may need an additional loader to handle the result of these loaders error showing in terminal when i installed nivo charts in my react app

Error Message

./node_modules/@react-spring/web/dist/esm/index.js 113:11

Module parse failed: Unexpected token (113:11)

The file was processed with these loaders:

*./node_modules/react-scripts/node_modules/babel-loader/lib/index.js

You may need an additional loader to handle the result of these loaders.

  this.transforms = I;
}
_value = null;
get() {
return this._value || (this._value = this._get());

I did yarn add @nivo/core @nivo/bar

Please help me resolve this error.

Upvotes: 5

Views: 689

Answers (1)

Phurba
Phurba

Reputation: 41

There are two ways to solve this issue:

  1. option 1, Change update package.json update the browserslist property of package.json with

      browserslist: [
      ">0.2%",
      "not dead",
      "not op_mini all"
     ]
    
  2. option 2, If you don't want to mess up with package.json then install a different nivo version. Nivo version above 0.80.0, seems to have a problem, so

    npm i @nivo/[email protected], or the below version works well 
    

Upvotes: 3

Related Questions