我有以下 CSS 文件:
/*!
* http://meyerweb.com/eric/tools/css/reset/
* v2.0 | 20110126
* License: none (public domain)
*/
...
然而,当我尝试解析它时,出现以下错误:
/usr/local/lib/node_modules/npm/node_modules/stylus/bin/stylus:502
throw err;
^
TypeError: reset.styl:2
1| /*!
> 2| * http://meyerweb.com/eric/tools/css/reset/
3| * v2.0 | 20110126
4| * License: none (public domain)
5| */
Cannot read property 'name' of undefined
我注意到手写笔对其他被屏蔽的评论也有问题(我只是删除了这些评论以解决问题,但现在我需要弄清楚发生了什么)。
我在这里做错了什么?
最佳答案
显然,我的编辑器正在将 .styl 文件创建为文本以外的其他内容,因此我更新了应用程序的文件类型关联,现在一切看起来都很好。
关于css - Stylus 无法正确解析评论?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11058771/