lavas-project / jekyll-pwa

Jekyll plugin for PWA
MIT License
105 stars 19 forks source link

jekyll-pwa-plugin.rb:161:in `block in <module:Jekyll>': undefined local #39

Open mswbull opened 3 years ago

mswbull commented 3 years ago

Since upgrading, I receive the following build error. Any guidance would be greatly appreciated?

/usr/gem/gems/jekyll-pwa-plugin-5.1.5/lib/jekyll-pwa-plugin.rb:161:in block in <module:Jekyll>': undefined local variable or methodpage' for Jekyll:Module (NameError)

from /usr/gem/gems/jekyll-4.2.0/lib/jekyll/hooks.rb:103:in block in trigger' from /usr/gem/gems/jekyll-4.2.0/lib/jekyll/hooks.rb:102:ineach' from /usr/gem/gems/jekyll-4.2.0/lib/jekyll/hooks.rb:102:in trigger' from /usr/gem/gems/jekyll-4.2.0/lib/jekyll/document.rb:392:intrigger_hooks' from /usr/gem/gems/jekyll-4.2.0/lib/jekyll/site.rb:548:in render_regenerated' from /usr/gem/gems/jekyll-4.2.0/lib/jekyll/site.rb:532:inblock (2 levels) in render_docs' from /usr/gem/gems/jekyll-4.2.0/lib/jekyll/site.rb:531:in each' from /usr/gem/gems/jekyll-4.2.0/lib/jekyll/site.rb:531:inblock in render_docs' from /usr/gem/gems/jekyll-4.2.0/lib/jekyll/site.rb:530:in each_value' from /usr/gem/gems/jekyll-4.2.0/lib/jekyll/site.rb:530:inrender_docs' from /usr/gem/gems/jekyll-4.2.0/lib/jekyll/site.rb:210:in render' from /usr/gem/gems/jekyll-4.2.0/lib/jekyll/site.rb:80:inprocess' from /usr/gem/gems/jekyll-4.2.0/lib/jekyll/command.rb:28:in process_site' from /usr/gem/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:65:inbuild' from /usr/gem/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:36:in process' from /usr/gem/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:inblock in process_with_graceful_fail' from /usr/gem/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in each' from /usr/gem/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:inprocess_with_graceful_fail' from /usr/gem/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:18:in block (2 levels) in init_with_program' from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:inblock in execute' from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in each' from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:inexecute' from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in go' from /usr/gem/gems/mercenary-0.4.0/lib/mercenary.rb:21:inprogram' from /usr/gem/gems/jekyll-4.2.0/exe/jekyll:15:in <top (required)>' from /usr/local/bundle/bin/jekyll:29:inload' from /usr/local/bundle/bin/jekyll:29:in `

'

bm1549 commented 3 years ago

I'm having the same issue

mswbull commented 3 years ago

Any update here? Thoughts on a fix?

kalwalt commented 3 years ago

i have the same issue, it could be some incompatibility between jekyll version and the plugin?

yshmarov commented 3 years ago

having the same when bundle updating to 5.1.5

/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/jekyll-pwa-plugin-5.1.5/lib/jekyll-pwa-plugin.rb:161:in `block in <module:Jekyll>': undefined local variable or method `page' for Jekyll:Module (NameError)

source of the problem: https://github.com/lavas-project/jekyll-pwa/blob/master/lib/jekyll-pwa-plugin.rb#L161

and the commit that likely introduced the problem: https://github.com/lavas-project/jekyll-pwa/commit/a3af93c64775a96e926d2d7a2b2f65b7f6f46978#diff-4e52afc06c7bc2b8f0a305bcb7eab8cf0ddcf58f44c26dbc2bc52f0eec14e58cR161

yshmarov commented 3 years ago

until fixed, I'm freezing my gem version gem 'jekyll-pwa-plugin', "= 2.2.3"

vidhyav656 commented 1 year ago

gem 'jekyll-pwa-plugin', "= 2.2.3"

Thanks!! works well.