git:ExecJS :: ProgramError:意外的令牌:推送到生产环境时的名称(jquery)

武士蓝

我已经尝试git push过托管服务(不是heroku)。我在Windows上键入了以下命令。

rake assets:precompile
git add .
git commit -m "xxx"
git push origin master

然后在主机服务屏幕上显示以下错误。

I, [2014-11-08T09:28:48.280141 #22295]  INFO -- : Writing /var/repos/xxx/xxx/public/assets/noimage-9f9de98ce95d5c9108e75feb33a04e35.gif
rake aborted!
ExecJS::ProgramError: Unexpected token: name (jquery) (line: 12946, col: 8, pos: 364216)

Error
    at new JS_Parse_Error (<eval>:2316:10736)
    at js_error (<eval>:2316:10955)
    at croak (<eval>:2316:18665)
    at token_error (<eval>:2316:18802)
    at unexpected (<eval>:2316:18890)
    at semicolon (<eval>:2316:19363)
    at simple_statement (<eval>:2316:21849)
    at <eval>:2316:20090
    at <eval>:2316:19536
    at <eval>:2316:31209
  (in /var/repos/xxx/xxx/app/assets/javascripts/application.js)/var/repos/xxx/xxx/vendor/bundle/ruby/2.1.0/gems/execjs-2.0.2/lib/execjs/ruby_racer_runtime.rb:34:in `rescue in block in eval'
/var/repos/xxx/xxx/vendor/bundle/ruby/2.1.0/gems/execjs-2.0.2/lib/execjs/ruby_racer_runtime.rb:28:in `block in eval'
/var/repos/xxx/xxx/vendor/bundle/ruby/2.1.0/gems/execjs-2.0.2/lib/execjs/ruby_racer_runtime.rb:80:in `block in lock'
/var/repos/xxx/xxx/vendor/bundle/ruby/2.1.0/gems/therubyracer-0.10.2/lib/v8/c/locker.rb:13:in `Locker'
/var/repos/xxx/xxx/vendor/bundle/ruby/2.1.0/gems/execjs-2.0.2/lib/execjs/ruby_racer_runtime.rb:78:in `lock'
/var/repos/xxx/xxx/vendor/bundle/ruby/2.1.0/gems/execjs-2.0.2/lib/execjs/ruby_racer_runtime.rb:27:in `eval'
    .
    .
    .

尽管noimage-9f9de98ce95d5c9108e75feb33a04e35.gif错误消息的第一行上有文件名,但我将其保存app\assets\images\noimage.gif在本地。

这与错误有关吗?

中有一些文件\app\assets\javascripts

application.js

// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require turbolinks
//= require_tree .
require jquery.turbolinks

calendars.js.coffee

# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
$(document).ready( ->
  $('html, body').animate({ scrollTop: 0 }, 'slow')
)

还有其他一些js.coffee文件,但是它们没有下面的任何代码。

# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

我该如何解决这个问题?

艾琳·凯尔(Erin Call)

我认为这noimage-9f9de98ce95d5c9108e75feb33a04e35.gif是一条红色的鲱鱼-这只是错误之前的最后一个成功日志行。

我相信require,在application.js末尾的那条语句应该有一个前导//=绝对不是写的有效JS。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

Rails 5 Heroku部署错误:ExecJS :: ProgramError:语法错误:意外的令牌:名称(autoRegisterNamespace)

来自分类Dev

ExecJS :: ProgramError:尝试预编译资产进行生产时出现意外字符“#”

来自分类Dev

尝试推送到heroku时出现ExecJS错误?

来自分类Dev

清单#index中的Rails 4 ExecJS :: ProgramError

来自分类Dev

ExecJS :: ProgramError在Welcome#index中

来自分类Dev

在git中本地取消跟踪文件夹并推送到生产环境而不删除

来自分类Dev

git子模块未推送到生产

来自分类Dev

ExecJS::ProgramError: Unexpected character '#' when trying to precompile assets for production

来自分类Dev

Ruby on Rails:样式表不起作用ExecJS :: ProgramError

来自分类Dev

Rails:ExecJS :: ProgramError:RangeError:超出最大调用堆栈大小

来自分类Dev

当我推送到 git 时,我收到错误,即组件名称太长

来自分类Dev

推送到git时进行部署

来自分类Dev

推送到git时进行部署

来自分类Dev

在特定提交时从git / svn repo推送到git / branch

来自分类Dev

Welcome#index TypeError中的ExecJS :: ProgramError:对象不支持此属性或方法

来自分类Dev

推送到Git服务器时无效的SSL证书

来自分类Dev

在推送到远程仓库时强制使用特定版本的git

来自分类Dev

当提交被推送到远程Git Repo中时

来自分类Dev

推送到git仓库时无法查找https致命错误

来自分类Dev

推送到远程Git存储库时出错

来自分类Dev

推送到git repo时应该忽略.obj文件吗?

来自分类Dev

推送到Git储备库时I / O超时

来自分类Dev

在将代码推送到分支时出现Git TypeInitializationException

来自分类Dev

将标签推送到GitLab时的Git hookerror

来自分类Dev

推送到git时忽略文件夹

来自分类Dev

推送到heroku git master时忽略警告

来自分类Dev

git:推送到远程时“打包有不良对象”

来自分类Dev

将数据推送到裸git仓库时,如何自动将数据推送到git-repo?

来自分类Dev

将数据推送到裸git仓库时,如何自动将数据推送到git-repo?

Related 相关文章

  1. 1

    Rails 5 Heroku部署错误:ExecJS :: ProgramError:语法错误:意外的令牌:名称(autoRegisterNamespace)

  2. 2

    ExecJS :: ProgramError:尝试预编译资产进行生产时出现意外字符“#”

  3. 3

    尝试推送到heroku时出现ExecJS错误?

  4. 4

    清单#index中的Rails 4 ExecJS :: ProgramError

  5. 5

    ExecJS :: ProgramError在Welcome#index中

  6. 6

    在git中本地取消跟踪文件夹并推送到生产环境而不删除

  7. 7

    git子模块未推送到生产

  8. 8

    ExecJS::ProgramError: Unexpected character '#' when trying to precompile assets for production

  9. 9

    Ruby on Rails:样式表不起作用ExecJS :: ProgramError

  10. 10

    Rails:ExecJS :: ProgramError:RangeError:超出最大调用堆栈大小

  11. 11

    当我推送到 git 时,我收到错误,即组件名称太长

  12. 12

    推送到git时进行部署

  13. 13

    推送到git时进行部署

  14. 14

    在特定提交时从git / svn repo推送到git / branch

  15. 15

    Welcome#index TypeError中的ExecJS :: ProgramError:对象不支持此属性或方法

  16. 16

    推送到Git服务器时无效的SSL证书

  17. 17

    在推送到远程仓库时强制使用特定版本的git

  18. 18

    当提交被推送到远程Git Repo中时

  19. 19

    推送到git仓库时无法查找https致命错误

  20. 20

    推送到远程Git存储库时出错

  21. 21

    推送到git repo时应该忽略.obj文件吗?

  22. 22

    推送到Git储备库时I / O超时

  23. 23

    在将代码推送到分支时出现Git TypeInitializationException

  24. 24

    将标签推送到GitLab时的Git hookerror

  25. 25

    推送到git时忽略文件夹

  26. 26

    推送到heroku git master时忽略警告

  27. 27

    git:推送到远程时“打包有不良对象”

  28. 28

    将数据推送到裸git仓库时,如何自动将数据推送到git-repo?

  29. 29

    将数据推送到裸git仓库时,如何自动将数据推送到git-repo?

热门标签

归档