文章目录
1. P16Pom文件的plugin标签报错
问题:加载pom文件时,报一下的错误
Unresolved plugin: 'com.spotify:docker-maven-plugin:0.4.14'
Unresolved plugin: 'org.codehaus.mojo:wagon-maven-plugin:1.0'
解决方法:引入对应的依赖
<dependency>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.14</version>
</dependency>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>1.0</version>
</dependency>
2. P16中Pom文件的project标签报错
问题:project标签报以下错误
'parent.relativePath' of POM io.renren:renren-fast:3.0.0 (D:\desktop\code\gu
解决方法:在parent标签中加入以下内容
<relativePath></relativePath>
3. P16执行npm install报错
问题:
解决方法:
(一)切换淘宝镜像安装
npm install -g cnpm --registry=https://registry.npm.taobao.org
(二)设置权限(管理员打开powerShell)
输入set-ExecutionPolicy RemoteSigned 选择A
(三)安装依赖
注意: npm 有些可能下载不下来
用 cnpm install
(四)启动
npm run dev
4. P16中前端项目编译报错
问题:执行npm run dev时报如下错误
Module build failed: Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (108)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v6.0.1
at module.exports (D:\desktop\code\gulimall\renren-fast-vue\node_modules\_node-sass@6.0.1@node-sass\lib\binding.js:13:13)
at Object.<anonymous> (D:\desktop\code\gulimall\renren-fast-vue\node_modules\_node-sass@6.0.1@node-sass\lib\index.js:13:35)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object.<anonymous> (D:\desktop\code\gulimall\renren-fast-vue\node_modules\_sass-loader@6.0.6@sass-loader\lib\loader.js:3:14)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at loadLoader (D:\desktop\code\gulimall\renren-fast-vue\node_modules\_loader-runner@2.4.0@loader-runner\lib\loadLoader.js:18:17)
解决方法:
npm uninstall --save node-sass
cnpm install --save node-sass
5. P18 启动测试类添加品牌时报错
问题:
java.lang.NoClassDefFoundError: org/springframework/boot/logging/DeferredLog
解决方法:更改与springboot兼容的cloud版本
spring-cloud":{
"Hoxton.SR12":"Spring Boot >=2.2.0.RELEASE and <2.4.0.M1",
“2020.0.6”:“Spring Boot >=2.4.0.M1 and <2.6.0-M1”,
“2021.0.0-M1”:“Spring Boot >=2.6.0-M1 and <2.6.0-M3”,
“2021.0.0-M3”:“Spring Boot >=2.6.0-M3 and <2.6.0-RC1”,
“2021.0.0-RC1”:“Spring Boot >=2.6.0-RC1 and <2.6.1”,
“2021.0.4”:“Spring Boot >=2.6.1 and ❤️.0.0-M1”,
“2022.0.0-M1”:“Spring Boot >=3.0.0-M1 and ❤️.0.0-M2”,
“2022.0.0-M2”:“Spring Boot >=3.0.0-M2 and ❤️.0.0-M3”,
“2022.0.0-M3”:“Spring Boot >=3.0.0-M3 and ❤️.0.0-M4”,
“2022.0.0-M4”:“Spring Boot >=3.0.0-M4 and ❤️.1.0-M1”}