booleanhunter / ReactJS-AdminLTE

ReactJS version of the original AdminLTE dashboard (EXPERIMENTAL)- https://github.com/almasaeed2010/AdminLTE
Other
2.35k stars 796 forks source link

Could not find a declaration file for module 'adminlte-reactjs'. #63

Open pwketankulkarni opened 5 years ago

pwketankulkarni commented 5 years ago

project is based on typescript step-1 npm install adminlte-reactjs step-2 import { InfoTile } from "adminlte-reactjs";

expected result - able to use InfoTile component

actual result Could not find a declaration file for module 'adminlte-reactjs'. '/home/ketan.k@ah.zymrinc.com/projects/reactJS/zymrIntranet/node_modules/adminlte-reactjs/reactjsAdminlte.js' implicitly has an 'any' type. Try npm install @types/adminlte-reactjs if it exists or add a new declaration (.d.ts) file containing `declare module 'adminlte-reactjs'

@types/adminlte-reactjs is dosent exist

pwketankulkarni commented 5 years ago

step-1 added "adminlte-reactjs.d.ts" file with the following content export = reactjsAdminlte; declare const reactjsAdminlte: any;

expected module should be imported successfully

actual ./node_modules/adminlte-reactjs/node_modules/react-dom/lib/ReactDOMUnknownPropertyHook.js Module not found: Can't resolve 'react/lib/ReactComponentTreeHook' in '/home/ketan.k@ah.zymrinc.com/projects/reactJS/zymrIntranet/node_modules/adminlte-reactjs/node_modules/react-dom/lib'

Screenshot from 2019-05-30 13-03-46