Quantcast
Channel: Requests for JS and CSS giving index.html instead - Stack Overflow
Browsing all 4 articles
Browse latest View live

Answer by tscizzle for Requests for JS and CSS giving index.html instead

The problem was "homepage": ... in package.json.When npm run build runs and there is a homepage URL in package.json that has a non-empty path (like a Github Pages URL like this,...

View Article



Answer by rorymorris89 for Requests for JS and CSS giving index.html instead

It appears that your app.use(express.static... call is failing, so instead all of the requests (including for the static assets) are being handled by the app.get('*', (req, res) => { part.As you are...

View Article

Answer by Jesse Johnson for Requests for JS and CSS giving index.html instead

Try the following code changes which are detailed from the express documentation - serving static files in express:Replaceapp.use(express.static(path.resolve(__dirname, '..',...

View Article

Image may be NSFW.
Clik here to view.

Requests for JS and CSS giving index.html instead

I'm using Express and create-react-app.My React app is a ways along, and now I'm trying to serve it from an Express server.// server/app.jsconst express = require('express');const path =...

View Article
Browsing all 4 articles
Browse latest View live




Latest Images