When I use blockly, nothing is on the page
I tried using blockly as the logic editor for my app, but when I use it, nothing renders and the console doesn't print anything out. I don't know how to troubleshoot this error. I didn't find the answer on both vite and blockly issues. Can anyone help me?


8 Replies
There is nothing in the app component

curious that it does not even render the markup
if you remove the
onMount
will it then render that markup?No, even if i delete onMount, it's still the same as before
Maybe you're missing the
render
function call?In that case it seems like your problem is unrelated to blockly, but rather that you aren't rendering the app.
You mention
solidstart
in the tags, maybe you aren't on the correct route? Would need to know more about your project structure to help you out.This is a new project I created using pnpm create solid@latest, I just replaced the contents of index.tsx with this. When I comment out blockly-related code, there will be content in the #app tag. I think it might not be a runtime error, maybe it is vite or something, and I'm not sure.
It shouldn't be, this is the result of I modifying index.tsx in the basic solidstart sample project. After pnpm create solid@latest, I replaced the content of index.tsx with this and turned off ssr.
Here's a "working" example on stackblitz.
I had to add a fixed width and height to the container and also
import 'blockly/blocks';
It renders something.
https://stackblitz.com/edit/github-v8vm1aah?file=src%2Froutes%2Findex.tsxThanks a lot, I was able to use it.🥳