I've been struggling with this issue for a few days now, and I can't tell what the problem is exactly. Basically, what's bothering me here is the following warning: WARNING in ./node_modules/colors/lib/colors.js 141:29-43 Critical dependency: the request of a dependency is an expression
. It causes my app to crash/not properly work.
I can make the other errors go away (such as ERROR in ./config/internals/environmentVars.js Module not found: Error: Can't resolve 'fs' in '/app/config/internals'
) by adding a line in my webpack config, but I cannot get rid of the first one. Any help on this topic will be greatly appreciated! I can provide you with more code if you need it.
I had the same problem compiling a node application. Solved placing in the webpack.config file the target option.
target: 'node'
Hope this helps
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.