create-react-ssr-app icon indicating copy to clipboard operation
create-react-ssr-app copied to clipboard

CSS not loaded?

Open ghost opened this issue 7 years ago • 21 comments

How can i fix this?

node v: 10.15.3 npm: 6.4.1

image

image

image

ghost avatar Apr 11 '19 02:04 ghost

@vncnzo is this happening after you first create the project? What version of react-ssr-scripts are you using?

maxparelius avatar Apr 11 '19 20:04 maxparelius

Yes, first time and I try to fix it but I don't know how.

image

ghost avatar Apr 12 '19 04:04 ghost

@vncnzo what commands did you run and steps to repro?

maxparelius avatar Apr 15 '19 18:04 maxparelius

npx create-react-ssr-app, npm start. Idk why it doesnt include css and import png, svg etc. I uninstall node, reinstall to try if it will be fixed but nothing changed.

ghost avatar Apr 15 '19 18:04 ghost

@vncnzo its a strange error looks like just cannot connect to the webpack dev server. Are there any errors on the terminal?

maxparelius avatar Apr 15 '19 18:04 maxparelius

Just the DeprecationWarning. Tapable plugin, use new Api on hooks

ghost avatar Apr 15 '19 18:04 ghost

@vncnzo are you able to run create-react-app? Try same commands with create react app.

npx create-react-app my-app
cd my-app
npm start

maxparelius avatar Apr 15 '19 18:04 maxparelius

yes, no errors.

ghost avatar Apr 15 '19 18:04 ghost

@vncnzo can you open the network tab and take screen shot of the requests going out for the css resource.

maxparelius avatar Apr 15 '19 18:04 maxparelius

image

image

ghost avatar Apr 15 '19 18:04 ghost

@vncnzo whats the response of that request

maxparelius avatar Apr 15 '19 18:04 maxparelius

nothing

image

ghost avatar Apr 15 '19 18:04 ghost

@vncnzo can you screen shot the same request for create-react-app?

maxparelius avatar Apr 15 '19 18:04 maxparelius

image

ghost avatar Apr 15 '19 19:04 ghost

@vncnzo Ok thanks I think I know what is happening will get a fix out soon and let you know.

maxparelius avatar Apr 15 '19 19:04 maxparelius

Thank you bro!

ghost avatar Apr 15 '19 19:04 ghost

@vncnzo can you upgrade react-ssr-scripts and try again? npm install --save react-ssr-scripts

maxparelius avatar Apr 15 '19 21:04 maxparelius

It works now. But when I refresh/load it has a delay to render the styles, is it normal?

image

ghost avatar Apr 16 '19 06:04 ghost

@vncnzo yea its just in dev mode with the way the styles are loaded. Not an issue in production.

maxparelius avatar Apr 17 '19 00:04 maxparelius

Have you guys by any chance found a workaround or a fix for that? I've stumbled upon the exact same problem, neither the JS bundle will load for me or any of the CSS files.

image

I've created the project using create-react-ssr-app freshly installed this evening, I'm using it with TypeScript. Tried to re-install the react-ssr-scripts package, but nothing changed.

When I open the project for the first time after running the yarn start command, it sometimes displays an error message saying "Cannot parse app.html" or something like that (cannot reproduce now, but will post a screenshot when it happens again).

EDIT There it is, the "parsing app.html" problem: image

patryk-bernasiewicz avatar Sep 13 '19 18:09 patryk-bernasiewicz