seed
seed copied to clipboard
quickstart fail
I did cargo generate --git https://github.com/seed-rs/seed-quickstart.git --name my-project
and then ran it but got: Loading module from “http://localhost:8000/pkg/package.js” was blocked because of a disallowed MIME type (“text/html”). This was on firefox on mac, but safari was no better. Was hoping to see a counter.
I can't reproduce it. Make sure the file my-project/pkg/package.js
exists. package,js
is generated only on successful build. When it's missing, dev server returns HTML hence the error.
And I would recommend to try Trunk and probably this starting project instead of the basic quickstart.
Hope it helps!
@gilescope any updates?
Actually I experience the same error when I follow the README instruction then resolved it by running cargo make build
as @MartinKavik referred to. If I understand correctly, the section "3. Prepare your project for work" doesn't have the step of building the /pkg
stuffs.
"3. Prepare your project for work" doesn't have the step of building the /pkg stuffs.
Build step should be a part of 3. Open a second terminal tab and run: cargo make watch
. Does cargo make watch
builds /pkg
? If so, perhaps we should switch steps 2. and 3. (?)
@MartinKavik
Sorry, you're right. I confirmed that the command cargo make watch
includes the build steps and generates /pkg
s. When I produced the error, I rushed to see the page localhost:8000 as the message from cargo make serve
tempted😅
So it might be nitpicky though, swapping the step 2. and 3. could be more helpful.
So it might be nitpicky though, swapping the step 2. and 3. could be more helpful.
But then the 4. step wouldn't make sense because you see errors only on the terminal when you run watch
...
Feel free to update the steps as you think make the most sense and create a PR with them 🙂
I had this same error message, but when opening in qutebrowser, I tested it on google chrome and firefox and it worked. But sometimes it happened that he did not update the page. From what I investigated it seems to be a problem with Miniserver. When I used the vscode Live Server, it worked normally in the qutebrowser
So it might be nitpicky though, swapping the step 2. and 3. could be more helpful.
But then the 4. step wouldn't make sense because you see errors only on the terminal when you run
watch
...Feel free to update the steps as you think make the most sense and create a PR with them slightly_smiling_face
Isn't it the case that "errors" mentioned in step 4 can be produced by either step 2 or step 3 or both?
If step 4 clarifies the source of errors and where they are displayed, maybe the instructions would still make sense after swapping step 2 and step 3.
I can confirm that running cargo make watch
is necessary to make the application to work in the browser.