vue2项目安装出现Syntax Error: Error: Cannot find module ‘less‘

简介: vue2项目安装出现Syntax Error: Error: Cannot find module ‘less‘

一个新项目安装的时候出现下面问题

网上说,一般都是说webpack版本与less-loader版本不匹配引起的

npm view webpack version  查看当然webpack版本

      开始直接用npm install less--legacy-peer-deps失败了,跟其它eslint版本好像有冲突,用其它版本也报错

      最后用npm install less@3.9.0 --legacy-peer-deps 成功了

相关文章
|
7月前
|
JavaScript
Syntax Error: Error: Cannot find module ‘node-sass‘
Syntax Error: Error: Cannot find module ‘node-sass‘
117 0
|
30天前
报错/ ./node_modules/axios/lib/platform/index.js Module parse failed: Unexpected token (5:2)怎么解决?
报错/ ./node_modules/axios/lib/platform/index.js Module parse failed: Unexpected token (5:2)怎么解决?
|
10月前
Vue3.0+ts填坑 warning Unexpected any报类型警告
Vue3.0+ts填坑 warning Unexpected any报类型警告
74 0
|
30天前
|
JavaScript
【Vue Error】 error Component name “product“ should always be multi-word vue/multi-word-compone……
【Vue Error】 error Component name “product“ should always be multi-word vue/multi-word-compone……
|
6月前
|
前端开发 JavaScript
Module build failed: TypeError: this.getResolve is not a function,vue写css时启动出错
Module build failed: TypeError: this.getResolve is not a function,vue写css时启动出错
22 0
|
6月前
|
JavaScript
Vue项目报错:This relative module was not found
Vue项目报错:This relative module was not found
|
6月前
【Error】This dependency was not found: * core-js/modules/es.error.cause.js in ./node_modules/@babel
【Error】This dependency was not found: * core-js/modules/es.error.cause.js in ./node_modules/@babel
|
7月前
|
JavaScript
vue 报错-Module not found: Error: Can't resolve 'element-plus' in '
vue 报错-Module not found: Error: Can't resolve 'element-plus' in '
133 1
|
7月前
|
JavaScript
vue 报错:Module not found:Error:Can't resolve 'vuex' in XXX
vue 报错:Module not found:Error:Can't resolve 'vuex' in XXX
110 1
|
7月前
|
机器学习/深度学习 缓存 JavaScript
vue报错-Error: Cannot find module 'fs/promises'
vue报错-Error: Cannot find module 'fs/promises'
54 1

热门文章

最新文章