我正在尝试使用以下脚本编译我sass
的:node-sass
package.json
"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 吗?我不明白我在这里做错了什么......