Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: [static_shock_docs] Throws on generation #143

Open
dickermoshe opened this issue Jun 9, 2024 · 2 comments
Open

bug: [static_shock_docs] Throws on generation #143

dickermoshe opened this issue Jun 9, 2024 · 2 comments

Comments

@dickermoshe
Copy link

Running dart run in the static_shock_docs project results in the following error:

Unhandled exception:
NoSuchMethodError: The method '[]' was called on null.
Receiver: null
Tried calling: []("flutter-bounty-hunters")
#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:38:5)
#1      getItem (package:jinja/src/defaults.dart:23:18)
#2      Context.item (package:jinja/src/context.dart:66:31)
#3      StringSinkRenderer.visitItem (package:jinja/src/renderer.dart:321:20)
#4      Item.accept (package:jinja/src/nodes/expressions.dart:498:20)
#5      StringSinkRenderer.visitAttribute (package:jinja/src/renderer.dart:225:28)
#6      Attribute.accept (package:jinja/src/nodes/expressions.dart:540:20)
#7      StringSinkRenderer.visitFor (package:jinja/src/renderer.dart:520:34)
#8      For.accept (package:jinja/src/nodes/statements.dart:55:20)
#9      StringSinkRenderer.visitOutput (package:jinja/src/renderer.dart:714:12)
#10     Output.accept (package:jinja/src/nodes.dart:109:20)
#11     Template.renderTo (package:jinja/src/environment.dart:569:10)
#12     Template.render (package:jinja/src/environment.dart:556:5)
#13     JinjaPageRenderer._renderJinjaTemplate (package:static_shock/src/plugins/jinja.dart:241:37)
#14     JinjaPageRenderer.renderContent (package:static_shock/src/plugins/jinja.dart:116:5)
#15     StaticShock._renderPages (package:static_shock/src/static_shock.dart:520:28)
<asynchronous suspension>
#16     StaticShock.generateSite (package:static_shock/src/static_shock.dart:227:5)
<asynchronous suspension>
#17     main (file:///C:/Users/dicke/static_shock/packages/static_shock_docs/bin/static_shock_docs.dart:42:3)
<asynchronous suspension>

I'm working on a new plugin, having a working example project to test with would be nice

@dickermoshe
Copy link
Author

I see you've opened an issue here ykmnkmi/jinja.dart#27

Guess we'll just have to wait for an error message

@matthew-carroll
Copy link
Contributor

These kinds of errors come up with a lot with minor configuration issues when using Jinja templates. It's often something like you expect that a variable exists but it doesn't. I see a reference to "flutter-bounty-hunters" in your error message.

I would recommend that you look for wherever that value appears in one of the Jinja files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants