【问题标题】:Getting an error while push to master on heroku server meteor在heroku服务器流星上推送到master时出错
【发布时间】:2017-03-23 14:16:09
【问题描述】:

推送到主 Heroku 服务器流星时出现以下错误

Building Meteor app with ROOT_URL: http://****.herokuapp.com
remote: Errors prevented bundling:
remote: While minifying app code:
remote: packages/minifyStdJS_plugin.js:113:28: UglifyJS minification error: 
remote: 
remote: SyntaxError: Unexpected token name «i», expected punc «;» at
remote: node_modules/joi/lib/index.js line 185

有人可以帮忙吗?

【问题讨论】:

  • 您的 joi 包文件 index.js 第 185 行中似乎存在 javascript 语法错误。
  • 是的,怎么解决?
  • 通过修改JS代码修复语法错误。

标签: meteor heroku


【解决方案1】:

我使用“Joi”和“joi-validation-strategy”进行验证。 Joi 不兼容 ES6,所以在 uglify 包时出错。

所以我将我的包“Joi”更改为“joi-browser”,将“joi-validation-strategy”更改为“joi-browser-validation-strategy”。 "joi-browser" 是 ES6 兼容的。

https://github.com/jeffbski/joi-browser

https://github.com/clarkeandrew/joi-validation-strategy

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-08-09
    • 1970-01-01
    • 2015-12-29
    • 2012-11-05
    • 2020-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-04-16
    相关资源
    最近更新 更多