ctrlplusb / react-universally

A starter kit for universal react applications.
MIT License
1.7k stars 244 forks source link

Error: Can't resolve 'fs' #474

Closed saniko closed 6 years ago

saniko commented 7 years ago

Hi, After merging the last PR, got this error message: Module not found: Error: Can't resolve 'fs'

came across this post After adding thefs: 'empty', to configFactory.js, it did solve the issue But now I'm getting errors about config values.

Full error after running yarn:


ERROR in ./config/utils/envVars.js
Module not found: Error: Can't resolve 'fs' in 'C:\Users\**\config\utils'
 @ ./config/utils/envVars.js 22:10-23
 @ ./config/values.js
 @ ./config/index.js
 @ ./shared/components/DemoApp/index.js
 @ ./client/index.js
 @ multi regenerator-runtime/runtime ./client/index.js

Running latest node: 8.1.4 Any Idea?

saniko commented 7 years ago

In addition, I'm getting this error as well:

ERROR in OfflinePlugin: Plugin's runtime wasn't added to one of your bundle entries. See this https://goo.gl/YwewYp for details.

saniko commented 7 years ago

I have rolled back the webpack related code (the version upgrades and the configFactory.js modifications) And now all is OK.

Does anyone have an idea why this error occurred?

diondirza commented 7 years ago

In my experience sometimes in Linux if RAM really limited and I have other node instance running this error will show up and I solve it by stop the process and re run.

saniko commented 7 years ago

Running on windows.