Questions tagged [netlify]

Ask questions about the Netlify setup, config or just in general using the netlify-cli or online at app.netlify.com

enter image description here

Netlify is a unified platform that automates your code to create high-performant, easily maintainable static web sites.
Simply push your code and let us take care of the rest.

2231 questions
91
votes
11 answers

How to prevent Netlify from treating warnings as errors because process.env.CI = true?

Deploying new projects started failing on Netlify. Checking the logs I see something that was not in the logs on previous successful deploys: Treating warnings as errors because process.env.CI = true. Most CI servers set it automatically. Failed to…
Dick Lucas
  • 12,289
  • 14
  • 49
  • 76
82
votes
16 answers

Netlify renders 404 on page refresh (using React and react-router)

I have deployed my site with Netlify, and I’m having trouble with the routing. Here is my website: https://redux-co.netlify.com/ And my GitHub repo: https://github.com/jenna-m/redux-co Specifically, if a user navigates to any page besides the home…
Jenna
  • 1,159
  • 2
  • 10
  • 16
76
votes
17 answers

Blank page after running build on create-react-app

Trying to deploy create-react-app on netlify, however my build is blank page. I'm using .env file for loading firebase api key is that a problem for build? Even when I tried to open it locally on my computer its blank page and it outputs an error in…
Verthon
  • 2,937
  • 3
  • 20
  • 32
41
votes
4 answers

vue: Uncaught TypeError: Cannot read property ... of undefined

I'm using vue@2.1.3 and the vue official webpack template to build an app. When developing locally, I often see the warning Uncaught TypeError: Cannot read property ... of undefined, but the HTML can be rendered successfully. However, the HTML can't…
Jerry Zhang
  • 1,251
  • 2
  • 13
  • 15
38
votes
19 answers

"Page Not Found" when trying to access a site deployed on Netlify

I'm running a static blogdown site and deploy it on Netlify. I source files on GitHub, Hugo builds the site, and Netlify deploys it. Netlify reports that the site is live (deploy log enclosed at the bottom), but when I'm trying to view my site, all…
Taraas
  • 1,268
  • 1
  • 11
  • 20
35
votes
5 answers

Angular routing not working on Netlify on page refresh

I deploy to netlify using ng build --prod, and the website works. But when I go to it, it automatically changes the link by adding /home onto the end. It still works, but then if I refresh the page or click any links to other pages, it doesn't work…
Betzel11
  • 559
  • 2
  • 6
  • 12
29
votes
7 answers

netlify deployment: Failed during stage 'building site': Build script returned non-zero exit code: 2

I'm trying to deploy my reactjs site to Netlify via Github but it was unsuccessful. The error message was Failed during stage 'building site': Build script returned non-zero exit code: 2 The following is the full Netlify log. 11:59:46 AM: Build…
Ian
  • 393
  • 1
  • 3
  • 5
26
votes
4 answers

Can I use Build Environment Variables in Netlify with Create-React-App?

How do I use Build Environment Variables in Netlify with Create-React-App?
Laura J
  • 361
  • 1
  • 3
  • 7
25
votes
2 answers

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

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:…
sintj
  • 804
  • 2
  • 11
  • 23
25
votes
2 answers

Catch all redirect for create-react-app in netlify

I have a built using create-react-app and hosted in netlify. In this link it is mentioned that I need to write redirect rules for SPAs. /* /index.html 200 But redirecting to index.html is not working since no view is rendered with that URL. I…
Sooraj
  • 9,717
  • 9
  • 64
  • 99
25
votes
6 answers

Add _redirects file to root path for Vue SPA hosted on Netlify

I'm developing a Single Page App using Vue CLI and want history pushstate to work so I get clean URLs. I have to follow this: https://www.netlify.com/docs/redirects/#history-pushstate-and-single-page-apps and add a _redirects file to the root of my…
Alex
  • 301
  • 1
  • 3
  • 10
23
votes
4 answers

I am trying to host my react website on netlify but there is a npm install error

I need some help! I'm trying to host on my reacy website on netlify but npm install error happens. Could you help me with solving this problem? Here is a error comments 12:28:19 AM: Installing NPM modules using NPM version 7.24.0 12:28:21 AM: npm…
jjeon17 jjeon17
  • 389
  • 3
  • 10
22
votes
5 answers

How do I add an arbitrary file to /public with Gatsby?

I would like to add a text file to /src in a way that it always ends up unchanged in the root of the build directory (/public). In my case specifically I need to add a _redirects file for Netlify to redirect a subdomain to a custom domain. Running…
agentofuser
  • 8,987
  • 11
  • 54
  • 85
18
votes
3 answers

How to enable CORS on a Netlify deployment?

I'm using Netlify to serve some static .json files. They load fine in the browser but when I try to fetch them via javascript I get the following error in the console: Access to fetch at (redirected from ) from origin 'http://localhost:3000' has…
user967451
17
votes
1 answer

NextJs: Static export with dynamic routes

I am a bit confused by the documentation and not sure if it's possible what I am trying to do. Goal: Export NextJS app statically and host it on netlify Allow users to create posts and have links to these posts which work For example: User…
siva
  • 1,183
  • 3
  • 12
  • 28
1
2 3
99 100