error in react-toastify/libs/index.js:1 when running tests
See original GitHub issueSince upgrading to version 4.2.0 to version 4.2.2, when I run tests with ts-jest I get the following error :
/home/arhia/Documents/projects/payroll-app-next/client/node_modules/react-toastify/lib/index.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import ToastContainer from './components/ToastContainer';
^^^^^^^^^^^^^^
SyntaxError: Unexpected identifier
ToastContainer seems properly exported/imported in that file, so I don’t understand the meaning of this error.
Our configuration : “react-toastify”: “4.2.2”, “react-scripts”: “1.1.5” “react-app-rewire-typescript”: “2.0.2”, “react-app-rewired”: “1.5.2”,
Could someone provide some hints ?
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Toastify React, error when attempting to use - Stack Overflow
I get the following error: Failed to compile. ./node_modules/react-toastify/dist/react-toastify.esm.mjs Can't import the named export ...
Read more >react-toastify - npm
Latest version: 9.1.1, last published: 2 months ago. Start using react-toastify in your project by running `npm i react-toastify`.
Read more >[Solved]-React JS: ERROR in index.css 1:0 (Module parse failed
Coding example for the question React JS: ERROR in index.css 1:0 (Module parse failed: Unexpected token (1:0))-Reactjs.
Read more >react-toastify.esm.mjs can't import the named export ... - You.com
My project was working correctly 100% until today when I started my development environment and it gave me a bunch of errors. The...
Read more >What is React Tostify: Types, Features, Installation and more
Now, let's test run it by showing a toast on the screen… Also, note that react toastify has a react native toastify version...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
thx a lot ! 👍 💃
@abenhamdine the issue is fixed now.
👍