#Upgrading to `7.0` | ModuleNotFoundError | /node_modules doesn't exist or is not a directory

4 messages · Page 1 of 1 (latest)

hidden ether
#

Errors on build of 7.0

ModuleNotFoundError: Module not found: Error: Can't resolve 'fs'
ModuleNotFoundError: Module not found: Error: Package path ./lib/utils
Field 'browser' doesn't contain a valid alias configuration
ModuleNotFoundError: Module not found: Error: Can't resolve 'stream'
ModuleNotFoundError: Module not found: Error: Can't resolve 'constants
ModuleNotFoundError: Module not found: Error: Can't resolve 'module' in '/Users/shofheins/repos/fabric/node_modules/jest-message-util/node_modules/stack-utils'
/node_modules doesn't exist or is not a directory

I've been able to resolve the fs, stream, constants by adding

                config.resolve.fallback.fs = false
        config.resolve.fallback.constants = false
        config.resolve.fallback.stream = false

But unable to figure out why the rest is breaking or a fix.

bitter cove
#

I’ve got the same error but with “copy-anything” which is a module used by less-loader, it seems that less uses require(“copy-anything”) and that module doesn’t exports a index.js, only .cjs and .es.js

hidden ether
#

Yeah IDK if I missed a step in the migration or what but i've spent way to much time trying to figure it out.