-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[gatsby-plugin-netlify] Missing CSS #4816
Comments
Hey @vojtechruz, a couple of questions - Did this start happening after changing any dependencies? Does the same thing happen when you run |
It may be some change on side of Netlify as it did not help when I reverted my dependencies. It does not happen locally in gatsby develop mode. |
Also, sometimes I received error 'Unable to find element with ID' which should happen when html is minified and comments stripped but I checked and in netlify options this was disabled. The error is described here: |
ProblemI'm having the same issue at the moment. Deploying to Netlify for the first time today. ConsiderationsMy build log looks basically identical to @vojtechruz. Despite the log stating Screenshot Examples
|
Update But No SolutionSpent way too much time on this today... So, I've tracked it down to this: the This is the case (for me, now) on my local and when publishing on Netlify.
|
@vojtechruz thanks for the link to your repo. I cloned it and can confirm that running
Does that work for you? @calebsylvest Can you confirm when the styles are not being built for you? In your screenshots it looks like it's just on netlify, but in your second comment it sounds like |
Oh man, I don't know why or how, but that fixed all my problems... which I'm thankful for. See the working site here: https://spacetime-gatsby.netlify.com/services @m-allanson Re: your question about my second comment. I didn't state that after wrestling with the build process and trying a number of fixes I ended up in a worse spot than I began–with all builds failing to compile styles. @m-allanson can you advise on setting Environment Variables on Netlify? I added My problem is solved. I'm going to read the documentation again on deploying to Netlify. We could probably use documentation on gotchas and troubleshooting Gatsby problems somewhere. |
@m-allanson I tried to remove package-lock.json and deploy to Netlify, but with no effect: https://5acc849f73f2cf66baeff09c--vojtechruzicka.netlify.com/ https://github.com/vojtechruz/vojtechruzicka-blog/tree/netlify-plugin-error As for other steps you cannot really delete node modules on Netlify, so I cannot do that, right? |
You can delete node_modules - in your deploys tab, click trigger deploy and check "clear build cache" |
After clearing build cache and removing package-lock.json it works also on netlify. |
as sugested gatsbyjs/gatsby#4816
Sadly this steps doesnt work on me. delete package-lock.json I hope the gatsby team, look at this issue. |
Had this same issue. The above steps worked for me, but I'm using yarn and had to make sure to remove both lock files - removing only the package-lock wasn't enough. |
LAtely, when I am using gatsby-plugin-netlify v 1.0.19 and deploying to Netlify as usual, my CSS is missing. I don't see any errors during build or in console.
Example is available here:
https://5ac331fddf99537dcbeaccca--vojtechruzicka.netlify.com/
With source code here:
https://github.com/vojtechruz/vojtechruzicka-blog/tree/netlify-plugin-error
When I remove the plugin, everything works fine, example is here:
https://www.vojtechruzicka.com/
I am using gatsby-plugin-sass 1.0.25
Build log:
9:49:18 AM: Build ready to start
9:49:20 AM: Fetching cached dependencies
9:49:20 AM: Starting to download cache of 188.9MB
9:49:21 AM: Finished downloading cache in 1.294407531s
9:49:21 AM: Starting to extract cache
9:49:25 AM: Finished extracting cache in 4.099888846s
9:49:26 AM: Finished fetching cache in 6.662053232s
9:49:26 AM: Starting to prepare the repo for build
9:49:27 AM: Preparing Git Reference refs/heads/netlify-plugin-error
9:49:35 AM: Starting build script
9:49:35 AM: Installing dependencies
9:49:36 AM: Started restoring cached node version
9:49:38 AM: Finished restoring cached node version
9:49:38 AM: v8.11.1 is already installed.
9:49:39 AM: Now using node v8.11.1 (npm v5.6.0)
9:49:39 AM: Attempting ruby version 2.3.6, read from environment
9:49:40 AM: Using ruby version 2.3.6
9:49:40 AM: Using PHP version 5.6
9:49:40 AM: Started restoring cached node modules
9:49:40 AM: Finished restoring cached node modules
9:49:41 AM: Started restoring cached go cache
9:49:41 AM: Finished restoring cached go cache
9:49:41 AM: unset GOOS;
9:49:41 AM: unset GOARCH;
9:49:41 AM: export GOROOT='/opt/buildhome/.gimme/versions/go1.10.linux.amd64';
9:49:41 AM: export PATH="/opt/buildhome/.gimme/versions/go1.10.linux.amd64/bin:${PATH}";
9:49:41 AM: go version >&2;
9:49:41 AM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.10.linux.amd64.env';
9:49:41 AM: go version go1.10 linux/amd64
9:49:41 AM: Installing missing commands
9:49:41 AM: Verify run directory
9:49:41 AM: Executing user command: gatsby build
9:49:42 AM: success delete html and css files from previous builds — 0.010 s
9:49:42 AM: success open and validate gatsby-config.js — 0.005 s
9:49:42 AM: success copy gatsby files — 0.017 s
9:49:43 AM: success onPreBootstrap — 0.719 s
9:49:44 AM: success source and transform nodes — 0.906 s
9:49:44 AM: success building schema — 0.420 s
9:49:44 AM: success createLayouts — 0.008 s
9:49:45 AM: success createPages — 0.162 s
9:49:45 AM: success createPagesStatefully — 0.014 s
9:49:45 AM: success onPreExtractQueries — 0.003 s
9:49:45 AM: success update schema — 0.283 s
9:49:45 AM: success extract queries from components — 0.186 s
9:50:07 AM: success run graphql queries — 22.203 s
9:50:07 AM: success write out page data — 0.006 s
9:50:07 AM: success write out redirect data — 0.001 s
9:52:00 AM: info bootstrap finished - 139.116 s
9:52:00 AM: success onPostBootstrap — 0.001 s
9:52:05 AM: success Building CSS — 4.898 s
9:52:23 AM: success Building production JavaScript bundles — 17.973 s
9:52:28 AM: success Building static HTML for pages — 5.676 s
9:52:29 AM: Total precache size is about 453 kB for 5 resources.
9:52:29 AM: info Done building in 167.874 sec
9:52:29 AM: Caching artifacts
9:52:29 AM: Started saving node modules
9:52:29 AM: Finished saving node modules
9:52:29 AM: Started saving pip cache
9:52:29 AM: Finished saving pip cache
9:52:29 AM: Started saving emacs cask dependencies
9:52:29 AM: Finished saving emacs cask dependencies
9:52:29 AM: Started saving maven dependencies
9:52:29 AM: Finished saving maven dependencies
9:52:29 AM: Started saving boot dependencies
9:52:29 AM: Finished saving boot dependencies
9:52:29 AM: Started saving go dependencies
9:52:29 AM: Finished saving go dependencies
9:52:29 AM: Build script success
9:52:29 AM: Starting to deploy site from 'public/'
9:52:38 AM: Starting post processing
9:52:40 AM: Post processing done
9:52:40 AM: Site is live
9:53:00 AM: Finished processing build request in 3m41.301093087s
The text was updated successfully, but these errors were encountered: