You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 27, 2021. It is now read-only.
when code require a non-exists path like: require.context('./components', false, /[\w-]+\.vue$/);
webpack will throw an exception:
ModuleNotFoundError: Module not found: Error: Can't resolve './components' in '/Users/unightsun/workspace/js/crawler-v2/cms-server/src' at factory.create (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/webpack/lib/Compilation.js:798:10) at asyncLib.parallel (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/webpack/lib/ContextModuleFactory.js:143:23) at /Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/neo-async/async.js:2817:7 at /Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/neo-async/async.js:6783:13 at contextResolver.resolve (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/webpack/lib/ContextModuleFactory.js:118:26) at doResolve (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/enhanced-resolve/lib/Resolver.js:184:12) at hook.callAsync (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/enhanced-resolve/lib/Resolver.js:238:5) at _fn0 (eval at create (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:15:1) at resolver.doResolve (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:37:5) at hook.callAsync (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/enhanced-resolve/lib/Resolver.js:238:5) at _fn0 (eval at create (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:15:1) at hook.callAsync (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/enhanced-resolve/lib/Resolver.js:238:5) at _fn0 (eval at create (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:12:1) at resolver.doResolve (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:42:38) at hook.callAsync (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/enhanced-resolve/lib/Resolver.js:238:5) at _fn3 (eval at create (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:42:1) resolve './components' in '/Users/unightsun/workspace/js/crawler-v2/cms-server/src' using description file: /Users/unightsun/workspace/js/crawler-v2/cms-server/package.json (relative path: ./src) Field 'browser' doesn't contain a valid alias configuration using description file: /Users/unightsun/workspace/js/crawler-v2/cms-server/package.json (relative path: ./src/components) as directory /Users/unightsun/workspace/js/crawler-v2/cms-server/src/components doesn't exist
friendly-errors-webpack-plugin: "version": "1.7.0"
webpack: "version": "4.20.2"
when code require a non-exists path like:
require.context('./components', false, /[\w-]+\.vue$/);
webpack will throw an exception:
ModuleNotFoundError: Module not found: Error: Can't resolve './components' in '/Users/unightsun/workspace/js/crawler-v2/cms-server/src' at factory.create (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/webpack/lib/Compilation.js:798:10) at asyncLib.parallel (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/webpack/lib/ContextModuleFactory.js:143:23) at /Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/neo-async/async.js:2817:7 at /Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/neo-async/async.js:6783:13 at contextResolver.resolve (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/webpack/lib/ContextModuleFactory.js:118:26) at doResolve (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/enhanced-resolve/lib/Resolver.js:184:12) at hook.callAsync (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/enhanced-resolve/lib/Resolver.js:238:5) at _fn0 (eval at create (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:15:1) at resolver.doResolve (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:37:5) at hook.callAsync (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/enhanced-resolve/lib/Resolver.js:238:5) at _fn0 (eval at create (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:15:1) at hook.callAsync (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/enhanced-resolve/lib/Resolver.js:238:5) at _fn0 (eval at create (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:12:1) at resolver.doResolve (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:42:38) at hook.callAsync (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/enhanced-resolve/lib/Resolver.js:238:5) at _fn3 (eval at create (/Users/unightsun/workspace/js/crawler-v2/cms-server/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:42:1) resolve './components' in '/Users/unightsun/workspace/js/crawler-v2/cms-server/src' using description file: /Users/unightsun/workspace/js/crawler-v2/cms-server/package.json (relative path: ./src) Field 'browser' doesn't contain a valid alias configuration using description file: /Users/unightsun/workspace/js/crawler-v2/cms-server/package.json (relative path: ./src/components) as directory /Users/unightsun/workspace/js/crawler-v2/cms-server/src/components doesn't exist
it's dependencies is:
[ RequireContextDependency { module: null, weak: false, optional: false, loc: SourceLocation { start: [Object], end: [Object] }, options: { request: './components', recursive: false, regExp: /[\w-]+\.vue$/, mode: 'sync' }, userRequest: './components', critical: false, hadGlobalOrStickyRegExp: false, range: [ 384, 438 ] } ]
so 'friendly-errors-webpack-plugin/src/transformers/moduleNotFound.js:17':
will be undefined.
and then 'friendly-errors-webpack-plugin/src/formatters/moduleNotFound.js:5'
will throw a TypeError: Cannot read property 'startsWith' of undefined
optional fix will be 'friendly-errors-webpack-plugin/src/transformers/moduleNotFound.js:17':
The text was updated successfully, but these errors were encountered: