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

MIME blocking of app.js and style.css #135

Open
jtyrmn opened this issue Aug 21, 2024 · 0 comments
Open

MIME blocking of app.js and style.css #135

jtyrmn opened this issue Aug 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jtyrmn
Copy link

jtyrmn commented Aug 21, 2024

I'm looking to contribute to this project, however I'm having some frontend-side issues setting it up.

Describe the bug
Upon running ./wga serve visiting http://127.0.0.1:8090/, the website does not load properly due to app.js and styles.css not being loaded. This is the error presented in the console by the browser:

GET
http://127.0.0.1:8090/assets/css/style.css
NS_ERROR_CORRUPTED_CONTENT

GET
http://127.0.0.1:8090/assets/js/app.js
NS_ERROR_CORRUPTED_CONTENT

The resource from “http://127.0.0.1:8090/assets/css/style.css” was blocked due to MIME type (“application/json”) mismatch (X-Content-Type-Options: nosniff). 127.0.0.1:8090
The resource from “http://127.0.0.1:8090/assets/js/app.js” was blocked due to MIME type (“application/json”) mismatch (X-Content-Type-Options: nosniff). 127.0.0.1:8090
Loading failed for the <script> with source “http://127.0.0.1:8090/assets/js/app.js”. 127.0.0.1:8090:105:2657

assets/public/css/style.css and assets/public/js/app.js are both present in the project directory.

To Reproduce
The commands steps I took to setup the project:

  1. git pull the repository
  2. cp .env.example .env
  3. setup the frontend stuff with these commands:
bun install
bun run build:js
bun run dev
  1. have docker compose up running in a separate terminal
  2. templ generate && go build -o wga
  3. ./wga serve

Expected behavior
For the webpage to run normally without these errors.

Desktop (please complete the following information):
reproducible on two machines and two browsers.

  • OS: Manjaro Linux release 24.0.5, kernel 5.15.163-1-MANJARO
  • Browser: Mozilla Firefox 128.0
  • OS: Ubuntu 20.04.6 LTS, kernel 5.4.0-192-generic
  • Browser: Mozilla Firefox 129.0.2
  • OS: Ubuntu 20.04.6 LTS, kernel 5.4.0-192-generic
  • Browser: Google Chrome 127.0.6533.99

Additional context
The setup isn't entirely clear and I'm unfamiliar with some of the tooling so I likely didn't set up the project properly.
I tried the previous git revision 2c7bdc8 (arbitrarily chosen). I used its code and instructions in its README and didn't encounter this error.
I am having no other issues than this one.

tooling versions (on Manjaro environment above):

  • bun 1.1.24
  • templ v0.2.752
  • go 1.22.5 linux/amd64
@jtyrmn jtyrmn added the bug Something isn't working label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant