Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.

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

Open
pwketankulkarni opened this issue May 30, 2019 · 1 comment
Open

Comments

@pwketankulkarni
Copy link

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
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant