我是sass / css / web设计的新手,我正在尝试自定义online open source template。 从上面的位置提取.zip文件后,我在命令提示符下运行以下命令集。注意-node.js已经安装在我的系统中。
npm install -g gulp //installing gulp globally
npm init //initialization
npm install --save-dev gulp //installing gulp locally - dev utility
npm install -g npm-install-all
npm-install-all gulpfile.js //Installing all required modules from gulpfile.js
准备好我的环境后。当我使用以下代码运行gulpfile.js中定义的gulp任务时,它会抛出所提到的错误:
C:\Users\my_user\Documents\my_project>gulp build
[18:42:36] Using gulpfile ~\Documents\my_project\gulpfile.js
[18:42:36] Starting 'build'...
[18:42:36] Starting 'clean:dist'...
[18:42:36] Finished 'clean:dist' after 4.27 ms
[18:42:36] Starting 'scss'...
Error in plugin 'sass'
Message:
assets\scss\custom\_mixins.scss
Error: File to import not found or unreadable: custom/mixins/alert.scss.
on line 1 of assets/scss/custom/_mixins.scss
from line 28 of assets/scss/argon.scss
>> @import "custom/mixins/alert.scss";
^
[18:42:37] Finished 'scss' after 805 ms
[18:42:37] Starting 'copy:css'...
[18:42:37] Finished 'copy:css' after 33 ms
[18:42:37] Starting 'copy:js'...
[18:42:37] Finished 'copy:js' after 11 ms
[18:42:37] Starting 'minify:js'...
[18:42:37] Finished 'minify:js' after 128 ms
[18:42:37] Starting 'minify:css'...
[18:42:38] Finished 'minify:css' after 992 ms
[18:42:38] Finished 'build' after 2 s
所有文件的内容均未更改,并且与git repo相同。因此,如果有人要参考,可以检查之前附加的链接。
我正在将Windows-10机器用于:
>npm -v
6.4.1
>node -v
v8.12.0
>gulp -v
[19:04:01] CLI version 3.9.1
[19:04:01] Local version 3.9.1