Cannot use it on ReactJs ,
See original GitHub issue# creating a simple winston variable and calling the log function from it shows the errors bellow
ERROR in ./~/winston/lib/winston/common.js
Module not found: Error: Cannot resolve module 'fs' in
ERROR in ./~/pkginfo/lib/pkginfo.js
Module not found: Error: Cannot resolve module 'fs' in <filepath>
ERROR in ./~/winston/lib/winston/transports/file.js
Module not found: Error: Cannot resolve module 'fs' in
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Cannot find module 'react' - Stack Overflow
I Was facing this issue and in my case, I was referring a .env file and it was missing from my repo. Bring...
Read more >Cannot use import statement outside a module [React ...
When building a web application, you may encounter the SyntaxError: Cannot use import statement outside a module error.
Read more >Invalid Hook Call Warning - React
There are three common reasons you might be seeing it: You might have mismatching versions of React and React DOM. You might be...
Read more >How to Read React Errors (fix 'Cannot read property of ...
The Quick Fix. This error usually means you're trying to use .map on an array, but that array isn't defined yet.
Read more >Cannot use import statement outside a module at Sample.jsx ...
ReactJS.NET : React.Core 5.2.11, React.AspNet 5.2.11 · JavaScriptEngineSwitcher : JavaScriptEngineSwitcher.V8 3.12.15 · react and react-dom : (N/A if using ...
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
@bradisbell I’d guess you are importing the winston in a browser environment, which winston is not supporting right now (see #582). Even if you think your winston is imported in a server-only file (let’s say logger.js), make sure to check that logger.js is not imported into another file used by webpack browser build. It is common that this happens with universal rendering. In short, winston stays in Node only.
Same issue here!