ReactJS-AdminLTE icon indicating copy to clipboard operation
ReactJS-AdminLTE copied to clipboard

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

Open pwketankulkarni opened this issue 5 years ago • 1 comments

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/[email protected]/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 avatar May 30 '19 05:05 pwketankulkarni

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/[email protected]/projects/reactJS/zymrIntranet/node_modules/adminlte-reactjs/node_modules/react-dom/lib'

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

pwketankulkarni avatar May 30 '19 07:05 pwketankulkarni