-
-
Notifications
You must be signed in to change notification settings - Fork 700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error ToastContainer after running tsc
in command line
#561
error ToastContainer after running tsc
in command line
#561
Comments
use export default `ToastContainer` from '/src/components/ToastContainer.tsx' files, then recreate variable `ToastContainer` in `src/components/index.tsx` instead. fix fkhadra#561
fix typos from 'Optionnal' to 'Optional'. add more values on `type` props fix fkhadra#561
If you dont mind, please check here to resolve this issue. |
Hello @achmadk, I think that something is wrong with your setup. I've been using the library exclusively with typescript and I never had this issue. Maybe if you can share your |
If skipLibCheck is false, "tsc" is fired on librairies and it fails because a class ToastContainer is not present in react-toastify. $ yarn tsc node_modules/react-toastify/dist/components/index.d.ts:3:15 - error TS2307: Cannot find module './ToastContainer' or its corresponding type declarations. Issue related: fkhadra/react-toastify#561
If skipLibCheck is false, "tsc" is fired on librairies and it fails because a class ToastContainer is not present in react-toastify. $ yarn tsc node_modules/react-toastify/dist/components/index.d.ts:3:15 - error TS2307: Cannot find module './ToastContainer' or its corresponding type declarations. Issue related: fkhadra/react-toastify#561
Thanks, @felixmosh that was helpful. TBH I don't even know how this happened. I've built it again and published a new version to npm. |
@fkhadra I've just tested 7.0.3, same issue :| |
@felixmosh can you delete node_modules/react-toastify ? |
Yeap, that helped, Thanx for the quick fix |
@felixmosh you're welcome. cc @achmadk |
use export default `ToastContainer` from '/src/components/ToastContainer.tsx' files, then recreate variable `ToastContainer` in `src/components/index.tsx` instead. fix fkhadra#561
fix typos from 'Optionnal' to 'Optional'. add more values on `type` props fix fkhadra#561
use default import instead of `ToastContainer` to fix error testing fix fkhadra#561
Issue has been fixed in version 7.0.3 Issue related: fkhadra/react-toastify#561
Issue has been fixed in version 7.0.3 Issue related: fkhadra/react-toastify#561
Do you want to request a feature or report a bug?
Report a bug
What is the current behavior?
After upgrading
react-toastify
to v7.0.2, I executetsc
in command line. Unfortunately I got error message like this:If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your CodeSandbox (https://codesandbox.io/s/new) example below:
ToastContainer
component, then use it into your app.tsc
What is the expected behavior?
No error emit after execute
tsc
.Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
I am using react v17 and ubuntu OS.
The text was updated successfully, but these errors were encountered: