Skip to content
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

fix: module not found: Error: Can't resolve 'fs' #198

Open
arshbot opened this issue May 9, 2020 · 1 comment
Open

fix: module not found: Error: Can't resolve 'fs' #198

arshbot opened this issue May 9, 2020 · 1 comment
Assignees
Labels
bug dependencies Pull requests that update a dependency file need more info

Comments

@arshbot
Copy link

arshbot commented May 9, 2020

Installed this project and attempted to use for a simple reactjs app, however I get Module not found: Error: Can't resolve 'fs'

Some logs below

webpack is watching the files…                                                                                                                                                                                                                
                                                                                                                                                                                                                                              
Hash: 70050155cee77a81d4b4                                                                                                                                                                                                                    
Version: webpack 4.43.0                                                                                                                                                                                                                       
Time: 6734ms                                                                                                                                                                                                                                  
Built at: 05/08/2020 8:50:06 PM                                                                                                                                                                                                               
  Asset      Size  Chunks             Chunk Names                                                                                                                                                                                             
main.js  12.8 MiB    main  [emitted]  main                                                                                                                                                                                                    
Entrypoint main = main.js                                                                                                                                                                                                                     
[0] util (ignored) 15 bytes {main} [built]                                                                                                                                                                                                    
[1] util (ignored) 15 bytes {main} [built]                                                                                                                                                                                                    
[../../../../node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 472 bytes {main} [built]                                                                                                                                     
[../../../../node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {main} [built]                                                                                                                                     
[./node_modules/import-fresh sync recursive] ./node_modules/import-fresh sync 160 bytes {main} [built]                                                                                                                                        
[./node_modules/moment/locale sync recursive ^\.\/.*$] ./node_modules/moment/locale sync ^\.\/.*$ 3.13 KiB {main} [optional] [built]                                                                                                          
[./src/index.js] 35 bytes {main} [built]                                                                                                                                                                                                      
    + 3263 hidden modules                                                                                                                                                                                                                     
                                                                                                                                                                                                                                              
WARNING in ./node_modules/import-fresh/index.js 28:8-25                                                                                                                                                                                       
Critical dependency: the request of a dependency is an expression                                                                                                                                                                             
 @ ./node_modules/cosmiconfig/dist/loaders.js                                                                                                                                                                                                 
 @ ./node_modules/cosmiconfig/dist/index.js                                                                                                                                                                                                   
 @ ./node_modules/webfont/dist/standalone.js                                                                                                                                                                                                  
 @ ./node_modules/webfont/dist/index.js                                                                                                                                                                                                       
 @ ./src/components/App.js                                                                                                                                                                                                                    
 @ ./src/index.js                                                                                                                                                                                                                             
                                                                                                                                                                                                                                              
ERROR in ./node_modules/@mrmlnc/readdir-enhanced/lib/async/index.js                                                                                                                                                                           
Module not found: Error: Can't resolve 'fs' in '/home/harshagoli/Projects/ssss-django/sss_server/sss_react/node_modules/@mrmlnc/readdir-enhanced/lib/async'                                                                                   
 @ ./node_modules/@mrmlnc/readdir-enhanced/lib/async/index.js 9:6-19                                                                                                                                                                          
 @ ./node_modules/@mrmlnc/readdir-enhanced/lib/index.js                                                                                                                                                                                       
 @ ./node_modules/fast-glob/out/providers/reader-async.js                                                                                                                                                                                     
 @ ./node_modules/fast-glob/out/index.js                                                                                                                                                                                                      
 @ ./node_modules/fast-glob/index.js                                                                                                                                                                                                          
 @ ./node_modules/globby/index.js                                                                                                                                                                                                             
 @ ./node_modules/webfont/dist/standalone.js                                                                                                                                                                                                  
 @ ./node_modules/webfont/dist/index.js                                                                                                                                                                                                       
 @ ./src/components/App.js                                                                                                                                                                                                                    
 @ ./src/index.js                                                                                                                                                                                                                             
                                                                                                                                                                                                                                              
ERROR in ./node_modules/@mrmlnc/readdir-enhanced/lib/stream/index.js                                                                                                                                                                          
Module not found: Error: Can't resolve 'fs' in '/home/harshagoli/Projects/ssss-django/sss_server/sss_react/node_modules/@mrmlnc/readdir-enhanced/lib/stream'                                                                                  
 @ ./node_modules/@mrmlnc/readdir-enhanced/lib/stream/index.js 8:6-19                                                                                                                                                                         
 @ ./node_modules/@mrmlnc/readdir-enhanced/lib/index.js                                                                
 @ ./node_modules/fast-glob/out/providers/reader-async.js                                                              
 @ ./node_modules/fast-glob/out/index.js                                                                               
 @ ./node_modules/fast-glob/index.js                                                                                   
 @ ./node_modules/globby/index.js                                                                                      
 @ ./node_modules/webfont/dist/standalone.js                                                                           
 @ ./node_modules/webfont/dist/index.js                                                                                
 @ ./src/components/App.js                                 
 @ ./src/index.js                                          
@jimmyandrade jimmyandrade added this to To do in webfont project Sep 29, 2020
@jimmyandrade jimmyandrade self-assigned this Sep 29, 2020
@jimmyandrade jimmyandrade added dependencies Pull requests that update a dependency file need more info labels Sep 29, 2020
@jimmyandrade
Copy link
Collaborator

@arshbot Thank you for using webfont. I'm sorry you're experiencing this error.

  1. Have you tried to deleted all the packages from node_modules/ and do a npm install/yarn?
  2. Is there some browser entry on your package.json. If yes, is there a fs property with value false or true?
  3. Could you send a minimal example for reproduction or, at least, your package.json and webpack.config files?

@jimmyandrade jimmyandrade assigned arshbot and unassigned jimmyandrade Sep 29, 2020
@jimmyandrade jimmyandrade changed the title Module not found: Error: Can't resolve 'fs' [Bug] Module not found: Error: Can't resolve 'fs' Sep 29, 2020
@jimmyandrade jimmyandrade changed the title [Bug] Module not found: Error: Can't resolve 'fs' fx: module not found: Error: Can't resolve 'fs' Sep 29, 2020
@jimmyandrade jimmyandrade changed the title fx: module not found: Error: Can't resolve 'fs' fix: module not found: Error: Can't resolve 'fs' Sep 29, 2020
@jimmyandrade jimmyandrade removed this from To do in webfont project Sep 29, 2020
@jimmyandrade jimmyandrade added this to Needs triage in webfont bug triage via automation Sep 29, 2020
@jimmyandrade jimmyandrade moved this from Needs triage to Low priority in webfont bug triage Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dependencies Pull requests that update a dependency file need more info
Projects
Development

No branches or pull requests

2 participants