使用npm install -g sass的Sass安装错误

时间:2018-06-25 13:25:42

标签: node.js sass

我只是尝试安装sass,每次运行sass时都会出现此错误,sass --version,我只是将npm和node更新到最新版本,但仍然没有运气

C:\Users\axel mhar valdepena\AppData\Roaming\npm\node_modules\sass\sass.dart.js:1997
    throw H.e(H.cH(a,function(e,f){return e.replace(/[^<,> ]+/g,function(g){return f[g]||g})}(z+y,init.mangledGlobalNames)))},
    ^

TypeError: Instance of 'dz': type 'dz' is not a subtype of type 'List<String>'
    at Object.e (C:\Users\axel mhar valdepena\AppData\Roaming\npm\node_modules\sass\sass.dart.js:1629:3)
    at Object.c (C:\Users\axel mhar valdepena\AppData\Roaming\npm\node_modules\sass\sass.dart.js:1997:9)
    at uZ.dart.fh (C:\Users\axel mhar valdepena\AppData\Roaming\npm\node_modules\sass\sass.dart.js:10234:19)
    at Object.tK (C:\Users\axel mhar valdepena\AppData\Roaming\npm\node_modules\sass\sass.dart.js:1597:69)
    at Object.fy (C:\Users\axel mhar valdepena\AppData\Roaming\npm\node_modules\sass\sass.dart.js:5690:28)
    at dart.Cd (C:\Users\axel mhar valdepena\AppData\Roaming\npm\node_modules\sass\sass.dart.js:7278:10)
    at Object.run_ (C:\Users\axel mhar valdepena\AppData\Roaming\npm\node_modules\sass\sass.dart.js:7266:42)
    at Object.<anonymous> (C:\Users\axel mhar valdepena\AppData\Roaming\npm\node_modules\sass\sass.js:8:7)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)

1 个答案:

答案 0 :(得分:0)

您可以尝试:

  • 从路径sass中删除目录C:\Users\axel mhar valdepena\AppData\Roaming\npm\node_modules\
  • 然后在控制台中,再次运行$ npm install -g sass