npm run dev:h5
test@0.1.0 dev:h5 E:\workspace\BEREE\mobile-hospital\trunk\test\test
cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve
请注意运行模式下,因日志输出、sourcemap以及未压缩源码等原因,性能和包体积,均不及发行模式。
INFO Starting development server...
ERROR Failed to compile with 5 errors 18:34:00
error in ./src/pages/componentsB/readMore/index.vue?vue&type=style&index=0&id=5f0fdb0a&lang=scss&scoped=true&
Module build failed (from D:/Develop-tools/nodejs/node_global/node_modules/sass-loader/dist/cjs.js):
SassError: expected selector.
╷
115 │ .wrap /deep/ .u-content{
│ ^
╵
src\pages\componentsB\readMore\index.vue 115:7 root stylesheet
@ ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/h5-vue-style-loader??ref--8-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-2!./node_modules/postcss-loader/src??ref--8-oneOf-1-3!D:/Develop-tools/nodejs/node_global/node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-5!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-scoped-loader!./src/pages/componentsB/readMore/index.vue?vue&type=style&index=0&id=5f0fdb0a&lang=scss&scoped=true& 4:14-869 14:3-18:5 15:22-877
@ ./src/pages/componentsB/readMore/index.vue?vue&type=style&index=0&id=5f0fdb0a&lang=scss&scoped=true&
@ ./src/pages/componentsB/readMore/index.vue
@ ./src/pages.json
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://192.168.1.104:8081/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
error in ./src/pages/template/address/addSite.vue?vue&type=style&index=0&id=7fc6ec51&lang=scss&scoped=true&
Module build failed (from D:/Develop-tools/nodejs/node_global/node_modules/sass-loader/dist/cjs.js):
SassError: expected selector.
╷
118 │ /deep/ .line{
│ ^
╵
src\pages\template\address\addSite.vue 118:1 root stylesheet
@ ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/h5-vue-style-loader??ref--8-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-2!./node_modules/postcss-loader/src??ref--8-oneOf-1-3!D:/Develop-tools/nodejs/node_global/node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-5!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-scoped-loader!./src/pages/template/address/addSite.vue?vue&type=style&index=0&id=7fc6ec51&lang=scss&scoped=true& 4:14-871 14:3-18:5 15:22-879
@ ./src/pages/template/address/addSite.vue?vue&type=style&index=0&id=7fc6ec51&lang=scss&scoped=true&
@ ./src/pages/template/address/addSite.vue
@ ./src/pages.json
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://192.168.1.104:8081/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
AgoniNemo
解决方法就是把sass-loader版本改为7.0.0,然后安装node-sass
2021-06-07 15:40
睡不醒哎
回复 AgoniNemo:
2022-11-01 14:02