-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Error message detail + non valid error reports #93
Comments
I think you've discovered a bug in some regex I've written. What you're seeing there is the "component signature" for your
Plenti has to do things a little differently since we're compiling each component in v8 directly without using NodeJS or another runtime from the host machine. It makes it very strict about things like small JS syntax errors that might be ignored in other environments. Thanks @krothmuller! |
I will do as you say below… and update the issue#2 is true.
Don’t know if this is helpful… but thought I would add my two cents as far as looking into it.
I think there was an error at some point in LedMatrix.svelte when I was first defining it… (there always is ;) Then we the problem was fixed (and worked correctly in the browser, the error message remained. Like it was cached somehow. I stoped and restarted plenti serve and it didn’t go away… as well as VS Code…
This is not the first time this has happen. In the past it happen with other files, but I was in the heat of battle and thought it was my problem and wasn’t taking close note of the error message (it “seemed” close enough)
- Ken
… On Dec 14, 2020, at 11:18 AM, Jim Fisk ***@***.***> wrote:
I think you've discovered a bug in some regex I've written. What you're seeing there is the "component signature" for your LedMatrix.svelte component (the docs aren't great, but there are a few details on that here <https://plenti.co/docs/allComponents>). The signature should probably be layout_component_ledmatrix_svelte not layout_components_Led_svelteMatrix. Any chance you could help me debug by doing the following:
Paste your component in this issue so I can take a look?
Confirm that the component appears at this path layout/components/LedMatrix.svelte exactly (or send the actual location)
Paste the reference to the LedMatrix component from another file (to see how it's imported and used)
Plenti has to do things a little differently since we're compiling each component in v8 directly without using NodeJS or another runtime from the host machine. It makes it very strict about things like small JS syntax errors that might be ignored in other environments.
Thanks @krothmuller <https://github.com/krothmuller>!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#93 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AACIIW2MFJXUVBXMJ5LMBD3SUZQIFANCNFSM4U3FXMYA>.
|
The frontend JS can be a little more forgiving than the server generated HTML, so there's a chance that the hydrated component is still rendering but the HTML fallback is broken behind the scenes. If you try a hard refresh on the specific page that's referencing the component you might see weird behavior like it going to a different page than the one you expected. It also could just be cached like you mentioned. If you feel comfortable sharing a link to your project, I'd be happy to spin it up locally and take a look. Thanks for documenting the bug! |
Hi Again…
I provided all of the files in the components folder…. The top level file is the BitmapMaker.svelte which access the lower level ones… Just throw that on a page and you should be go to go. No content/allcontent of .json is used directly by BitmapMaker…
BTW - in the past I have seen when there are errors in MY code some times a completely different page appears. I did do a hard reset of chrome cleaning the cache, but no change. I assume that is what you meant by “hard refresh”
- Ken
… On Dec 14, 2020, at 12:31 PM, Jim Fisk ***@***.***> wrote:
The frontend JS can be a little more forgiving than the server generated HTML, so there's a chance that the hydrated component is still rendering but the HTML fallback is broken behind the scenes. If you try a hard refresh on the specific page that's referencing the component you might see weird behavior like it going to a different page than the one you expected. It also could just be cached like you mentioned. If you feel comfortable sharing a link to your project, I'd be happy to spin it up locally and take a look. Thanks for documenting the bug!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#93 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AACIIW3ENC4NS25GGDOKXVTSUZYYPANCNFSM4U3FXMYA>.
|
Oh sorry I didn't even see the attachment! I'll take a look at that and see if I can figure out what's going on here. Yes that's what I meant by hard refresh, so it's probably something different than I thought. I'll follow up once I've taken a look. Thanks! |
This was a Plenti bug, not something you were doing incorrectly. I just pushed a release that should fix the issue, so if you upgrade Plenti to It's related to the string replacement issue here: #62 (your specific issue should be fixed but that one is still broken). Just let me know if it's still giving you trouble! Thanks! |
Thanks Jim… will give it a whirl hopefully today some time. If I get some time to make more progress on my site this week maybe we could touch bases next week via Zoom to go over a collect of thoughts / questions that I have accumulated. I really appreciate how you jumped on my issues, wasn’t really expecting such fast response.
Cheers,
Ken
… On Dec 14, 2020, at 6:18 PM, Jim Fisk ***@***.***> wrote:
This was a Plenti bug, not something you were doing incorrectly. I just pushed a release that should fix the issue, so if you upgrade Plenti to v0.3.4 it should stop giving you this error.
It's related to the string replacement issue here: #62 <#62> (your specific issue should be fixed but that one is still broken).
Screenshot from working local copy
<https://user-images.githubusercontent.com/5913244/102159328-538db100-3e51-11eb-9552-22a09a1e103d.png>
Just let me know if it's still giving you trouble! Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#93 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AACIIWYMXOAHOGMRDNMDBC3SU3BNZANCNFSM4U3FXMYA>.
|
Here's an example repo for this issue in case it's helpful: https://github.com/jimafisk/plenti_bitmap_maker_example |
Good Morning / Afternoon Jim - you fix did the trick. Yay - hate to see errors in the terminal window! Now it is all clean and tidy… You might want to add this to the docs….
———
Plenti is updated frequently, to get the latest version after you first install with Brew (what I use), do:
brew upgrade plentico/plenti/plenti
———
I am not a Brew guy, but I would guess most Brew’ers already know this although the reference seems a little odd (to a non Brew’er - not sure why the extra plenti is there)
Guess there are really two pieces here… Your build system with Go and the actual Svelte stuff. I assume you take the latest builds form Svelte (at some kind of regular interval)?? But the version that a project uses gets Svelte version baked in at "Plenti new site" - time. - could be wrong though. So to update to the latest version of Svelte, one would need to do a "Plenti new site” and take the npm-module folder and use it to replace the current project version - correct? Or do you do that auto-magically with new version of Plenti…
Hopefully, I will have enough together by next week for a short chat if you are available.
Cheers,
Ken
… On Dec 16, 2020, at 10:30 AM, Jim Fisk ***@***.***> wrote:
Here's an example repo for this issue in case it's helpful: https://github.com/jimafisk/plenti_bitmap_maker_example <https://github.com/jimafisk/plenti_bitmap_maker_example>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#93 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AACIIW5T2LOXCQRDTCXMAWTSVD4EBANCNFSM4U3FXMYA>.
|
Lots of good points @krothmuller!
I haven't used homebrew in a few years, so I actually didn't know the correct way to update - thanks for testing that out! I'm surprised by the extra "plenti" as well, and would love to fix this so it's not needed. I assume this has something to do with the fact that I set it up as a Tap (Third-Party Repository). I'll play around with this to see if it can be streamlined a bit
I do manually bundle up newer versions of Svelte into the Plenti CLI (the Go engine that builds plenti sites). There's a whole workflow that happens behind the scenes that allows you to take over this process and begin managing your NPM packages independently of what Plenti is doing though. Common example scenarios:
Plenti will respect your updates and stop trying to use the defaults for the build, and this worked really well in the past but now there is one major hurdle preventing this from working properly. We're using a modified version of svelte (#76). It's increasingly looking like the Svelte project is not going to pull in an update to make our desired hydration process work properly, so I'm going to have to look at another approach for this. It's likely that I will end up processing the svelte package in Go to add the needed modification so that folks can start managing their own packages again, and we'll just fix standard Svelte on the fly to work with Plenti. Keep in mind if you modify your NPM packages, you'll need to account for this in CI so Plenti does not try to use the default packages (usually just means running
No, you could simply delete your current Thanks @krothmuller! |
Hi @krothmuller, I opened a new issue about updating the docs for upgrading to newer versions of Plenti: #102. I think we closed out the other threads on this issue, so I'm going to close this issue. If I missed something, feel free to reopen! Thanks! |
Error messages could be substantially improved.
Generally, there is reference to where the error occurred - ie which component
In addition, sometimes errors are reported and they are not valid. For example:
Can't render htmlComponent: ReferenceError: layout_components_Led_svelteMatrix is not defined
Can't render htmlComponent: ReferenceError: layout_components_Led_svelteMatrix is not defined
Total build took 475.769705ms
I have a LedMatrix.svelte file in my project (why is it reference in the error) and I can make changes to that file, it compiles fine and is used with the changes reflected in the browser
I included all the components in the components folder. (it is not pretty yet... just working on functionality)
components.zip
The text was updated successfully, but these errors were encountered: