简体   繁体   English

Polymer应用程序Firebase托管部署不起作用

[英]Polymer app firebase hosting deploy does not work

I have created a Polymer app using the starter kit from the yeoman generator as a starting point. 我已经使用yeoman生成器中的入门工具包创建了Polymer应用程序作为起点。 The app works fine locally. 该应用程序在本地运行良好。 After doing a full build, I did a firebase init, and a firebase deploy. 完成完整构建后,我进行了firebase初始化和firebase部署。 I get no errors, however, when I launch the app URL, I get what looks like vulcanized JavaScript displayed in chrome. 我没有收到任何错误,但是,当我启动应用程序URL时,得到的是看起来像是在chrome中显示的硫化JavaScript。

I am not sure what is wrong. 我不确定是怎么了。 No errors reported. 没有错误报告。

Thanks 谢谢

I've had a similar problem. 我有类似的问题。 After running vulcanize the page would only show JavaScript instead of the actual page content. 运行硫化后,页面仅显示JavaScript而不显示实际页面内容。 Started like: 开始像:

'),t=""+t+"";try{this.Ea.eb.open(),this.Ea.eb.write(t),this.Ea.eb.close()}catch(o){Cb("frame writing exception")...

There was also a syntax error in the index.bundle.js, which might have caused the problem. index.bundle.js中也存在语法错误,这可能是导致此问题的原因。

Uncaught SyntaxError: Unexpected token ILLEGAL -> index.build.js:13 Uncaught SyntaxError: Unexpected token ILLEGAL

I couldn't get the project to run in vulcanized state afterwards. 之后,我无法使项目在硫化状态下运行。 Solved the problem by creating a new poylmer starter kit project. 通过创建一个新的poylmer入门套件项目解决了该问题。 Worked like a charm after I copied my files into the fresh directory. 将文件复制到新目录后,工作起来像灵符一样。 Hope this might help you. 希望这对您有帮助。

The problem comes from Firebase library when you "vulcanize" your elements. 当您“硫化”您的元素时,问题来自Firebase库。

You have to exclude it from your vulcanize task (in gulpfile.js) 您必须将其从硫化任务中排除(在gulpfile.js中)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM