【发布时间】:2016-07-09 16:39:01
【问题描述】:
我正在尝试使用package.json 中的以下脚本将sass 与node-sass 一起编译:
"node-sass": "node-sass --output-style compressed 'src/scss/styles.scss' 'dist/css/bundle.min.css'",
我的styles.scss:
@import "bourbon";
@import "neat";
body {background: red;}
但是当我运行npm run node-sass 时,我收到以下错误:
"formatted": "Error: File to import not found or unreadable: bourbon\n Parent style sheet: /Users/deangibson/Desktop/personal_site/src/scss/styles.scss\n on line 1 of src/scss/styles.scss\n>> @import \"bourbon\";\n ^\n",
"message": "File to import not found or unreadable: bourbon\nParent style sheet: /Users/deangibson/Desktop/personal_site/src/scss/styles.scss",
"column": 1,
"line": 1,
"file": "/Users/deangibson/Desktop/personal_site/src/scss/styles.scss",
"status": 1
}
我的项目结构如下:
当涉及到依赖关系时,节点不应该自动签入 node_modules 吗?我不明白我在这里做错了什么......
【问题讨论】:
标签: javascript node.js sass npm node-sass