Can not resolve 'fs' in module 'linebreak'
See original GitHub issueThe linebreaker require ‘fs’ from native Node.js:
# src/linebreaker.coffee
UnicodeTrie = require 'unicode-trie'
fs = require 'fs'
base64 = require 'base64-js'
But webpack seems not support native Node.js module:
ERROR in ./~/react-canvas/~/linebreak/src/linebreaker.js
Module not found: Error: Cannot resolve module 'fs' in /Users/rui/Sandbox/react-canvas-layout.test/node_modules/react-canvas/node_modules/linebreak/src
resolve module fs in /Users/rui/Sandbox/react-canvas-layout.test/node_modules/react-canvas/node_modules/linebreak/src
I am trying to use browserify instead of webpack.
Issue Analytics
- State:
- Created 8 years ago
- Comments:13 (3 by maintainers)
Top Results From Across the Web
Module not found: Error: Can't resolve 'fs' in - Stack Overflow
I found a possible solution, that you have to put some configuration in one of the node_modules. But I think that is not...
Read more >module not found: error can t resolve 'fs react - You.com
Your quick fix is to take react scripts down to v4 until a fix for v5 is in place unless you are comfortable...
Read more >cypress-io/cypress - Gitter
Module not found: Error: Can't resolve 'fs'. _. However when I run the same code as a node file, it does work without...
Read more >[D] Can't resolve 'fs' : r/nextjs - Reddit
[D] Can't resolve 'fs'. Hey Guys,. I'm using firebase-admin in my project (i guess that's the source of issue). I'm only using that...
Read more >API - esbuild
By default esbuild will not bundle the input files. ... All built-in node modules such as fs are automatically marked as external so...
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
Got it. Well for others you’ll need to install the brfs transform.
Then add the brfs transform to your webpack config example
That’s the one yeah