[英]Issue with node-sass in angular 4 project
I'm facing following issue on MAC while running existing Angular4 Application. 运行现有的Angular4应用程序时,我在MAC上遇到以下问题。 It shows me this error on executing
ng serve
它显示了执行
ng serve
出现的错误
ERROR in ./node_modules/css-loader?{"sourceMap":false,"import":false}!./node_modules/postcss-loader/lib?{"ident":"postcss","sourceMap":false}!./node_modules/sass-loader/lib/loader.js?{"sourceMap":false,"precision":8,"includePaths":[]}!./node_modules/angular-calendar-week-hours-view/angular-calendar-week-hours-view.scss Module build failed: Error: Cannot find module 'node-sass'
./node_modules/css-loader中的错误?{“ sourceMap”:false,“ import”:false}!./ node_modules / postcss-loader / lib?{“ ident”:“ postcss”,“ sourceMap”:false}! ./node_modules/sass-loader/lib/loader.js?{"sourceMap":false,"precision":8,"includePaths::[]}!../node_modules/angular-calendar-week-hours-view/angular -calendar-week-hours-view.scss模块构建失败:错误:找不到模块“ node-sass”
Im importing style in angular-cli.json as follows 我在angular-cli.json中导入样式如下
"styles": [
"../node_modules/angular-calendar-week-hours-view/angular-calendar-week-hours-view.scss"
],
What could be the probable issue? 可能是什么问题?
"styleExt": "scss",
Added styleExt as scss in angular-cli.json. 在angular-cli.json中添加了styleExt作为scss。 I do have node 9.11.1
我确实有节点9.11.1
There is issue with latest node.js version. 最新的node.js版本存在问题。 Issue resolved with installation of older version 6.8.0
安装较旧版本6.8.0的问题已解决
Latest version is throwing error to npm install node-sass
It works good in lower version. 最新版本向
npm install node-sass
抛出错误在较低版本中效果很好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.