当前位置:首页 > 经验笔记 > VUE > 正文内容

vue 项目运行node-sass报错

han32682年前 (2023-06-19)VUE2245
  • 报错信息

Browserslist: caniuse-lite is outdated. Please run:
  npx browserslist@latest --update-db
  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
 INFO  Starting development server...
 WARN  A new version of sass-loader is available. Please upgrade for best experience.
98% after emitting CopyPlugin

 ERROR  Failed to compile with 1 error                                                                          
 error  in ./src/views/views.vue?vue&type=style&index=0&id=7f4cd9c4&lang=scss&scoped=true&

Syntax Error: Error: `sass-loader` requires `node-sass` >=4. Please install a compatible version.

    大概说的是sass 版本不匹配 

  • 解决方法先卸载现有的sass版本

npm i -D node-sass
  • 再安装依赖版本

npm rebuild node-sass
  •  node 和node-sass版本对应表格


f754ed2f8f14437ca76621f558d615e7.png


扫描二维码推送至手机访问。

版权声明:本文由瀚文博客发布,如需转载请注明出处。

本文链接:https://hanwenblog.com/post/83.html

分享给朋友:

相关文章

VUE拖放排序,好用的vue拖拽插件vuedraggable拖放排序

VUE拖放排序,好用的vue拖拽插件vuedraggable拖放排序

1  安装依赖:npm i -S vuedraggable2. 使用组件:html:    <draggable&...

简单理解Vue中的nextTick

简单理解Vue中的nextTick

官方文档:Vue 在更新 DOM 时是异步执行的,为了在数据变化之后等待 Vue 完成更新 DOM,可以在数据变化之后立即使用 Vue.nextTick(callback)。这样回调函数将在 DOM...

element-ui Tree 树形控件实现单选 最简方法VUE

做项目时需要用到Tree树形控件单选但是Tree组件没有单选设置,网上找了几个方法不太适应,看了官网文档发现很简单 代码如下      &n...

VUE computed和watch的区别最简化

VUE computed和watch的区别最简化

<!DOCTYPE html> <html lang="en"> <head>    &...

vue强制更新$forceUpdate()

vue强制更新$forceUpdate()

vue强制更新$forceUpdate()添加this.$forceUpdate();进行强制渲染,效果实现。搜索资料得出结果:因为数据层次太多,render函数没有自动更新,需手动强制刷新。调用强制...