[英]Materialize CSS Framework throws error
Running Meteor 1.1.6 with Materialize 0.96.1 and having no issues until I start up meteor one morning and get a white screen. 使用物化0.96.1运行Meteor 1.1.6并且在我一天早上启动流星并获得白屏之前没有问题。 Console (firebug) says:
控制台(萤火虫)说:
SyntaxError: unterminated string literal
var c = "input[type=text], input[type=passw
found in the generated file materialize_materialize.js
在生成的文件
materialize_materialize.js
Stepping back in version history I can't seem to find anything glaring that I changed which might be the culprit. 退回版本历史,我似乎无法找到任何明显的变化,这可能是罪魁祸首。 Looking at the source code I found the code respective code but the line is actually terminated:
查看源代码,我发现代码各自的代码,但该行实际上已终止:
var c = "input[type=text], input[type=password], input[type=email], input[type=url], input[type=tel], input[type=number], input[type=search], textarea";
Anyone else ever see this issue, or have any ideas on how to fix it? 其他人都看过这个问题,或者对如何修复它有任何想法?
Update: Seems that Meteor is generating the file just fine but stops mid-string in the above error. 更新:似乎Meteor正在生成文件,但在上述错误中停止了中间字符串。 After the string cut off, the file continues with:
字符串被截断后,文件继续:
/* Exports */
if (typeof Package === 'undefined') Package = {};
Package['materialize:materialize'] = {
Materialize: Materialize
};
})();
Oddly enough, this does not happen on my coworker's machine (he's using OSX 10.10.3, while I'm on Windows 7). 奇怪的是,这不会发生在我的同事的机器上(他使用的是OSX 10.10.3,而我使用的是Windows 7)。
2nd Update: Also tested this issue on an Ubuntu 14.04 VM, and there were no issues - the app ran just fine. 第二次更新:还在Ubuntu 14.04 VM上测试了这个问题,并且没有问题 - 应用程序运行得很好。 Thinking it might have something to do with the Meteor version on Windows, I blew away my install, downloaded the installer, and re-installed Meteor on my machine.
认为它可能与Windows上的Meteor版本有关,我吹走了我的安装,下载了安装程序,并在我的机器上重新安装了Meteor。 What d'ya know, it worked .
你知道什么, 它有效 。
Not going to mark this with an actual answer yet as I do not know what the cause of the issue is, other than something went wrong with Meteor itself - I think. 不会用实际的答案标记这个,因为我不知道问题的原因是什么,除了Meteor本身出了问题 - 我想。
Make sure you add a SASS package. 确保添加SASS包。 I suggest
fourseven:scss
我建议
fourseven:scss
Also, you could use poetic:materialize-scss
instead of materialize:materialize
. 此外,您可以使用
poetic:materialize-scss
而不是materialize:materialize
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.