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 成功了

相关文章
|
12月前
|
JavaScript
Syntax Error: Error: Cannot find module ‘node-sass‘
Syntax Error: Error: Cannot find module ‘node-sass‘
303 0
|
6月前
报错/ ./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)怎么解决?
Element-Module not found: Error: Can‘t resolve ‘@element-plus/icons-vue/dist/types‘ in ‘D:\project\
Element-Module not found: Error: Can‘t resolve ‘@element-plus/icons-vue/dist/types‘ in ‘D:\project\
Vue3.0+ts填坑 warning Unexpected any报类型警告
Vue3.0+ts填坑 warning Unexpected any报类型警告
120 0
|
12月前
|
JavaScript
vue 报错-Module not found: Error: Can't resolve 'element-plus' in '
vue 报错-Module not found: Error: Can't resolve 'element-plus' in '
267 1
|
12月前
|
JavaScript
vue 报错:Module not found:Error:Can't resolve 'vuex' in XXX
vue 报错:Module not found:Error:Can't resolve 'vuex' in XXX
179 1
|
12月前
|
机器学习/深度学习 缓存 JavaScript
vue报错-Error: Cannot find module 'fs/promises'
vue报错-Error: Cannot find module 'fs/promises'
161 1
|
11月前
|
前端开发 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时启动出错
45 0
|
11月前
|
JavaScript
Vue项目报错:This relative module was not found
Vue项目报错:This relative module was not found
打包报错Error: ‘default‘ is not exported by node_modules/qs/lib/index.js
打包报错Error: ‘default‘ is not exported by node_modules/qs/lib/index.js
263 0