一、该问题的重现步骤是什么?
1. 运行yarn run dev
2. 控制台报错
3.页面无法正常访问
二、你期待的结果是什么?实际看到的又是什么?
期待正常运行,
三、你正在使用的是什么产品,什么版本?在什么操作系统上?
Saber3开源前端,在window10系统上
四、请提供详细的错误堆栈信息,这很重要。
页面控制台如下:
PS D:\javaProject\blade\Saber> yarn run dev
yarn run v1.22.22
$ vite --host
VITE v5.4.19 ready in 2857 ms
➜ Local: http://localhost:2888/
➜ Network: http://192.168.29.1:2888/
➜ Network: http://192.168.71.1:2888/
➜ Network: http://10.110.120.95:2888/
➜ press h + enter to show help
X [ERROR] Expected ";" but found "\xb6"
node_modules/lodash/lodash.js:1:2:
1 │ ɽ���ع���������˾�Cah�eHn�YsF1���...
│ ^
╵ ;
Deprecation Warning [legacy-js-api]: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
More info: https://sass-lang.com/d/legacy-js-api
Deprecation Warning [legacy-js-api]: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
More info: https://sass-lang.com/d/legacy-js-api
Deprecation Warning [legacy-js-api]: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
More info: https://sass-lang.com/d/legacy-js-api
Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.
More info and automated migrator: https://sass-lang.com/d/import
╷
2 │ @import './variables.scss';
│ ^^^^^^^^^^^^^^^^^^
╵
src\styles\common.scss 2:9 root stylesheet
Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.
More info and automated migrator: https://sass-lang.com/d/import
╷
98 │ @import './element-ui.scss';
│ ^^^^^^^^^^^^^^^^^^^
╵
src\styles\common.scss 98:9 root stylesheet
Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.
More info and automated migrator: https://sass-lang.com/d/import
╷
100 │ @import './top.scss';
│ ^^^^^^^^^^^^
╵
src\styles\common.scss 100:9 root stylesheet
Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.
More info and automated migrator: https://sass-lang.com/d/import
╷
102 │ @import './tags.scss';
│ ^^^^^^^^^^^^^
╵
src\styles\common.scss 102:9 root stylesheet
Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.
More info and automated migrator: https://sass-lang.com/d/import
╷
104 │ @import './mixin.scss';
│ ^^^^^^^^^^^^^^
╵
src\styles\common.scss 104:9 root stylesheet
Warning: 17 repetitive deprecation warnings omitted.
Deprecation Warning [legacy-js-api]: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
More info: https://sass-lang.com/d/legacy-js-api
Deprecation Warning [legacy-js-api]: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
More info: https://sass-lang.com/d/legacy-js-api
Deprecation Warning [legacy-js-api]: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
More info: https://sass-lang.com/d/legacy-js-api
Deprecation Warning [legacy-js-api]: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
More info: https://sass-lang.com/d/legacy-js-api
Deprecation Warning [legacy-js-api]: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
More info: https://sass-lang.com/d/legacy-js-api
D:\javaProject\blade\Saber\node_modules\vite\node_modules\esbuild\lib\main.js:1472
let error = new Error(text);
^
Error: Build failed with 1 error:
node_modules/lodash/lodash.js:1:2: ERROR: Expected ";" but found "\xb6"
at failureErrorWithLog (D:\javaProject\blade\Saber\node_modules\vite\node_modules\esbuild\lib\main.js:1472:15)
at D:\javaProject\blade\Saber\node_modules\vite\node_modules\esbuild\lib\main.js:945:25
at D:\javaProject\blade\Saber\node_modules\vite\node_modules\esbuild\lib\main.js:1353:9
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
errors: [Getter/Setter],
warnings: [Getter/Setter]
}
Node.js v20.19.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
五、若有更多详细信息,请在下面提供。
扫一扫访问 Blade技术社区 移动端