2

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:

Arnaud Christ
  • 3,440
  • 3
  • 24
  • 33
Rin
  • 81
  • 2
  • 9

2 Answers2

0

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

Arnaud Christ
  • 3,440
  • 3
  • 24
  • 33
  • you see that is the problem, react-bootstrap-table is deprecated and im migrating from react-bootstrap-table to react-bootstrap-table2 or they call it react-bootstrap-table-next because it was taken. Upon install when I import I get the message from my main psost. What can I do to fix this. I dont get this error :S https://github.com/react-bootstrap-table/react-bootstrap-table2 – Rin Jun 24 '19 at 13:14
  • Then I suppose that the TypeScript type definitions are not yet existing for this new version. [DefinitelyTyped](https://definitelytyped.org/) is a project mainly maintained by community. – Arnaud Christ Jun 24 '19 at 13:17
  • This doesnt make sense because how the hell are other people using this and it only doesnt work for me. I am either missing something or doing something wrong lol – Rin Jun 24 '19 at 13:20
  • Where did you see it working within a TypeScript project ? Although, this [issue](https://github.com/react-bootstrap-table/react-bootstrap-table2/issues/384) in their GitHub repo tends to validate what I'm saying... – Arnaud Christ Jun 24 '19 at 14:07
  • I mean I have react js app which im using to execute my solidity contract functions. – Rin Jun 24 '19 at 14:34
0

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

Kodali444
  • 1,283
  • 1
  • 17
  • 21