当终端出现以下错误时:
WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value.
Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/
ERROR in main
Module not found: Error: Can't resolve './src' in 'C:\Users\tuchunrong\Program\code\前端项目代码\vscode\webpack'
resolve './src' in 'C:\Users\tuchunrong\Program\code\前端项目代码\vscode\webpack'
using description file: C:\Users\tuchunrong\Program\code\前端项目代码\vscode\webpack\package.json (relative path: .)
Field 'browser' doesn't contain a valid alias configuration
using description file: C:\Users\tuchunrong\Program\code\前端项目代码\vscode\webpack\package.json (relative path: ./src)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:\Users\tuchunrong\Program\code\前端项目代码\vscode\webpack\src doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\tuchunrong\Program\code\前端项目代码\vscode\webpack\src.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
C:\Users\tuchunrong\Program\code\前端项目代码\vscode\webpack\src.json doesn't exist
.wasm
Field 'browser' doesn't contain a valid alias configuration
C:\Users\tuchunrong\Program\code\前端项目代码\vscode\webpack\src.wasm doesn't exist
as directory
C:\Users\tuchunrong\Program\code\前端项目代码\vscode\webpack\src doesn't exist
webpack 5.73.0 compiled with 1 error and 1 warning in 151 ms
可能是由于目录选错,比如说我是选错了
我的目录应该在: