Open daveteu opened 6 years ago
Hi, I'm using 'react-notification' in our project with material UI. As 'react-notification' is the npm package you cannot install it using YARN(didn't work for us either). And when we did it with npm install 'react-notifications' --save, it worked for us. Also, if you're installing in the root, you need to add 'sudo'. Please let me know, if you find other way to install using YARN and please try installing it with npm install. Thanks in advance :)
I have the same issue too.
Any solution ?
I am using (create-react-ap) and with npm
I am getting this error
Could not find a declaration file for module 'react-notifications'. 'd:/workspace/portfolio/node_modules/react-notifications/lib/index.js' implicitly has an 'any' type.
Try npm install @types/react-notifications
if it exists or add a new declaration (.d.ts) file containing declare module 'react-notifications';
ts(7016)
For those of you that run into this error and just want this to work, you just tell typescript to ignore the next line for now until type definitions become available via npm install @types/react-notifications
(still not available as of writing).
// @ts-ignore
import { NotificationContainer, NotificationManager } from 'react-notifications';
You can find more information on this page: Don’t let TypeScript slow you down
Installed via Yarn add react-notifications
and follow to import in component like this
import {NotificationContainer, NotificationManager} from 'react-notifications';