seed icon indicating copy to clipboard operation
seed copied to clipboard

quickstart fail

Open gilescope opened this issue 3 years ago • 9 comments

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.

gilescope avatar Mar 13 '21 09:03 gilescope

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!

MartinKavik avatar Mar 13 '21 11:03 MartinKavik

@gilescope any updates?

azzamsa avatar Mar 22 '21 11:03 azzamsa

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.

etoal83 avatar Apr 03 '21 15:04 etoal83

"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 avatar Apr 03 '21 16:04 MartinKavik

@MartinKavik Sorry, you're right. I confirmed that the command cargo make watch includes the build steps and generates /pkgs. 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.

etoal83 avatar Apr 04 '21 07:04 etoal83

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 🙂

MartinKavik avatar Apr 04 '21 11:04 MartinKavik

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

SeraphyBR avatar Apr 29 '21 18:04 SeraphyBR

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.

flawphobic avatar May 25 '21 05:05 flawphobic

I can confirm that running cargo make watch is necessary to make the application to work in the browser.

Mec-iS avatar Sep 13 '22 12:09 Mec-iS