netlify

webpack-runtime js files getting a 404

帅比萌擦擦* 提交于 2021-02-10 08:45:32
问题 I've got a site built on Gatsby/Netlify that just recently started having an intermittent issue where some of the js assets return a 404. The issue seems to appear and go away on its own. Here's a screenshot of the devtools console: What kinds of things should I check? 回答1: Chances are you have gatsby-plugin-offline installed and it is caching old files. The Gatsby community is still looking for ways to 100% solve this issue, but there is a temporary solution that other websites have been

Nuxt compiles CSS Opacity at 1% instead of 100% when deployed to Netlify

ぐ巨炮叔叔 提交于 2021-02-09 08:29:59
问题 I have a Nuxt app that works great locally. When I deployed it to Netlify (where yarn generate was run automatically), I noticed that there were some odd CSS things going on. I have a card with a hover effect: <style lang="scss" scoped> .gallery-card { align-items: center; background: url('/backgrounds/image-1.jpg') no-repeat center center; background-size: cover; cursor: pointer; display: flex; flex-direction: column; height: 400px; justify-content: center; position: relative; max-width: 100

Nuxt compiles CSS Opacity at 1% instead of 100% when deployed to Netlify

雨燕双飞 提交于 2021-02-09 08:29:51
问题 I have a Nuxt app that works great locally. When I deployed it to Netlify (where yarn generate was run automatically), I noticed that there were some odd CSS things going on. I have a card with a hover effect: <style lang="scss" scoped> .gallery-card { align-items: center; background: url('/backgrounds/image-1.jpg') no-repeat center center; background-size: cover; cursor: pointer; display: flex; flex-direction: column; height: 400px; justify-content: center; position: relative; max-width: 100

Nuxt compiles CSS Opacity at 1% instead of 100% when deployed to Netlify

浪子不回头ぞ 提交于 2021-02-09 08:28:00
问题 I have a Nuxt app that works great locally. When I deployed it to Netlify (where yarn generate was run automatically), I noticed that there were some odd CSS things going on. I have a card with a hover effect: <style lang="scss" scoped> .gallery-card { align-items: center; background: url('/backgrounds/image-1.jpg') no-repeat center center; background-size: cover; cursor: pointer; display: flex; flex-direction: column; height: 400px; justify-content: center; position: relative; max-width: 100

Nuxt compiles CSS Opacity at 1% instead of 100% when deployed to Netlify

我只是一个虾纸丫 提交于 2021-02-09 08:27:34
问题 I have a Nuxt app that works great locally. When I deployed it to Netlify (where yarn generate was run automatically), I noticed that there were some odd CSS things going on. I have a card with a hover effect: <style lang="scss" scoped> .gallery-card { align-items: center; background: url('/backgrounds/image-1.jpg') no-repeat center center; background-size: cover; cursor: pointer; display: flex; flex-direction: column; height: 400px; justify-content: center; position: relative; max-width: 100

What's the real difference between target: 'static' and target: 'server' in Nuxt 2.14 universal mode?

元气小坏坏 提交于 2021-02-08 14:00:08
问题 in the latest version of Nuxt (2.14) they introduced an optimization for building the app when no code is changed (for drastically improve build times). I make websites in jamstack, deploy on netlify with nuxt generate and, until now, with target: 'server' . I tried the new target: 'static' in order to take advantage of this new feature, but my code won't build as it seems that in this mode the app can't access to this.$route in order to generate dynamic pages. So, my question is: how is this

No node_modules from netlify deploy

孤人 提交于 2021-02-07 08:59:21
问题 I've got continuous deployment setup with Netlify and a git repo but so far no matter what I do, Netlify isn't npm-install ing anything. There's no node_modules folder when I download a zip of the deploy, my site can't access node_modules, it's just not there. I've started with a random npm package (lodash) to try to get it to install but I've got nothing so far. Netlify says that it automatically runs npm install . I've tried having no build commands and I've tried adding npm install as a

No node_modules from netlify deploy

烈酒焚心 提交于 2021-02-07 08:56:16
问题 I've got continuous deployment setup with Netlify and a git repo but so far no matter what I do, Netlify isn't npm-install ing anything. There's no node_modules folder when I download a zip of the deploy, my site can't access node_modules, it's just not there. I've started with a random npm package (lodash) to try to get it to install but I've got nothing so far. Netlify says that it automatically runs npm install . I've tried having no build commands and I've tried adding npm install as a

How to use Environmental or OS variables in self-created JavaScript files

浪尽此生 提交于 2021-02-05 12:21:10
问题 I created a helpers.js under <project_root>/static folder Inside this JS file, I have method which needs access to the environmental/OS variables. async function saveRegistration(pushSubscriptionObject) { let url = ""; try { url = `${process.env.GATSBY_FUNCTION_URL_BASE}${process.env.GATSBY_FUNCTION_UPDATE_SUBSCRIPTION}`; console.log("using netlify config: ", url); console.log("--------updateSub() url--------", url); } catch (ex) { console.log("saveReg() catch block:", JSON.stringify(ex));

Reduce initial server response time with Netlify and Gatsby

帅比萌擦擦* 提交于 2021-02-05 12:15:22
问题 I'm running PageSpeed Insights on my website and one big error that I get sometimes is Reduce initial server response time Keep the server response time for the main document short because all other requests depend on it. Learn more. React If you are server-side rendering any React components, consider using renderToNodeStream() or renderToStaticNodeStream() to allow the client to receive and hydrate different parts of the markup instead of all at once. Learn more. I looked up