Rin
Rin

Reputation: 81

Could not find a declaration file for module 'react-bootstrap-table-next'

I'm trying to run 'react-bootstrap-table-next' with my reactjs app. I'm having a problem

enter image description here

root@ubuntu:/home/rin/sc-deal/client# npm install @types/react-bootstrap-table-next

root@ubuntu:/home/rin/sc-deal/client# npm install @types/react-bootstrap-table-next npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/@types%2freact-bootstrap-table-next - Not found npm ERR! 404 npm ERR! 404 '@types/react-bootstrap-table-next@latest' is not in the npm registry. npm ERR! 404 You should bug the author to publish it (or use the name yourself!) npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-06-24T12_58_36_545Z-debug.log root@ubuntu:/home/rin/sc-deal/client#

also error in my app because of it:

Upvotes: 2

Views: 3483

Answers (2)

Kodali444
Kodali444

Reputation: 1443

I got the same issue in my project. When I installed this package first time i used below command.

$ yarn add @types/react-bootstrap-table-next

It did not work. so i removed it and re-installed it with below command.

$ yarn add react-bootstrap-table-next @types/react-bootstrap-table-next

This worked fine for me. In my project i used typescript.

Refer this link also if it is useful: https://github.com/react-bootstrap-table/react-bootstrap-table2/issues/989

Upvotes: 0

Arnaud Christ
Arnaud Christ

Reputation: 3551

react-bootstrap-table-next doesn't exist in the @types scope.

You should instead use react-bootstrap-table.

npm install --save @types/react-bootstrap-table

Upvotes: 0

Related Questions