<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ollie Saunderson</title>
    <description>The latest articles on DEV Community by Ollie Saunderson (@olliesaunderson).</description>
    <link>https://dev.to/olliesaunderson</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F376995%2F2e116382-2114-44cb-a202-45105baafedf.png</url>
      <title>DEV Community: Ollie Saunderson</title>
      <link>https://dev.to/olliesaunderson</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/olliesaunderson"/>
    <language>en</language>
    <item>
      <title>Why does 'yarn build' show a blank page when building my react app?</title>
      <dc:creator>Ollie Saunderson</dc:creator>
      <pubDate>Thu, 30 Apr 2020 18:01:54 +0000</pubDate>
      <link>https://dev.to/olliesaunderson/why-does-yarn-build-show-a-blank-page-when-building-my-react-app-32h8</link>
      <guid>https://dev.to/olliesaunderson/why-does-yarn-build-show-a-blank-page-when-building-my-react-app-32h8</guid>
      <description>&lt;p&gt;I have created a website using create-react-app however when I try to run it using yarn build all I get is a blank white page and this error in the console:&lt;/p&gt;

&lt;p&gt;"Failed to load resource: net::ERR_FILE_NOT_FOUND custom.css:1"&lt;/p&gt;

&lt;p&gt;I can run it using 'yarn start' and it works perfectly with no errors... &lt;/p&gt;

&lt;p&gt;I have tried adding '%PUBLIC_URL%' to the './custom.css' and this hasn't worked, I have also tried adding '"homepage": "."', to the 'package.json' but this hasnt worked, I have also tried to import the CSS directly into my 'App.js':&lt;/p&gt;

&lt;p&gt;import React from "react";&lt;br&gt;
import home from "./pages/home"&lt;br&gt;
import about from "./pages/about"&lt;br&gt;
import stats from "./pages/stats"&lt;br&gt;
import contact from "./pages/contact"&lt;br&gt;
import faq from "./pages/faq"&lt;br&gt;
import login from "./pages/Login"&lt;br&gt;
import signup from "./pages/SignUp"&lt;br&gt;
import {&lt;br&gt;
  BrowserRouter as Router,&lt;br&gt;
  Route&lt;br&gt;
} from 'react-router-dom';&lt;/p&gt;

&lt;p&gt;import './custom.css'&lt;/p&gt;

&lt;p&gt;class App extends React.Component {&lt;br&gt;
  render() {&lt;br&gt;
    return (&lt;br&gt;
      &lt;br&gt;
        &lt;br&gt;
  &lt;br&gt;
          &lt;br&gt;
          &lt;br&gt;
          &lt;br&gt;
          &lt;br&gt;
          &lt;br&gt;
          &lt;br&gt;
          &lt;br&gt;
        &lt;br&gt;
      &lt;br&gt;
    )&lt;br&gt;
  }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;export default App;&lt;br&gt;
index.html file:&lt;/p&gt;

&lt;p&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;br&gt;
&lt;br&gt;
  &lt;/p&gt;
&lt;br&gt;
    &lt;br&gt;
    &lt;br&gt;
    &lt;br&gt;
    &lt;br&gt;
    
      name="description"&lt;br&gt;
      content="Web site created using create-react-app"&lt;br&gt;
    /&amp;gt;&lt;br&gt;
    &lt;br&gt;
    &amp;lt;!--&lt;br&gt;
      manifest.json provides metadata used when your web app is installed on a&lt;br&gt;
      user's mobile device or desktop. See &lt;a href="https://developers.google.com/web/fundamentals/web-app-manifest/"&gt;https://developers.google.com/web/fundamentals/web-app-manifest/&lt;/a&gt;&lt;br&gt;
    --&amp;gt;&lt;br&gt;
    &lt;br&gt;
    &amp;lt;!--&lt;br&gt;
      Notice the use of %PUBLIC_URL% in the tags above.&lt;br&gt;
      It will be replaced with the URL of the &lt;code&gt;public&lt;/code&gt; folder during the build.&lt;br&gt;
      Only files inside the &lt;code&gt;public&lt;/code&gt; folder can be referenced from the HTML.
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
  work correctly both with client-side routing and a non-root public URL.
  Learn how to configure a non-root public URL by running `npm run build`.
--&amp;gt;
&amp;lt;title&amp;gt;StatHero&amp;lt;/title&amp;gt;
&amp;lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;br&gt;
    You need to enable JavaScript to run this app.&lt;br&gt;
    &lt;br&gt;
    &amp;lt;!--&lt;br&gt;
      This HTML file is a template.&lt;br&gt;
      If you open it directly in the browser, you will see an empty page.
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  You can add webfonts, meta tags, or analytics to this file.
  The build step will place the bundled scripts into the &amp;lt;body&amp;gt; tag.

  To begin the development, run `npm start` or `yarn start`.
  To create a production bundle, use `npm run build` or `yarn build`.
--&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;package.json file:&lt;/p&gt;

&lt;p&gt;{&lt;br&gt;
  "name": "prototypesite",&lt;br&gt;
  "homepage": "./",&lt;br&gt;
  "version": "0.1.0",&lt;br&gt;
  "private": true,&lt;br&gt;
  "dependencies": {&lt;br&gt;
    "@testing-library/jest-dom": "^4.2.4",&lt;br&gt;
    "@testing-library/react": "^9.3.2",&lt;br&gt;
    "@testing-library/user-event": "^7.1.2",&lt;br&gt;
    "babel-eslint": "10.0.1",&lt;br&gt;
    "bootstrap": "^4.4.1",&lt;br&gt;
    "jquery": "^3.4.1",&lt;br&gt;
    "popper.js": "^1.16.0",&lt;br&gt;
    "react": "^16.12.0",&lt;br&gt;
    "react-bootstrap": "^1.0.0-beta.16",&lt;br&gt;
    "react-dom": "^16.12.0",&lt;br&gt;
    "react-router-dom": "^5.1.2",&lt;br&gt;
    "react-scripts": "3.0.1",&lt;br&gt;
    "style": "^0.0.3"&lt;br&gt;
  },&lt;br&gt;
  "scripts": {&lt;br&gt;
    "start": "react-scripts start",&lt;br&gt;
    "build": "react-scripts build",&lt;br&gt;
    "test": "react-scripts test",&lt;br&gt;
    "eject": "react-scripts eject"&lt;br&gt;
  },&lt;br&gt;
  "eslintConfig": {&lt;br&gt;
    "extends": "react-app"&lt;br&gt;
  },&lt;br&gt;
  "browserslist": {&lt;br&gt;
    "production": [&lt;br&gt;
      "&amp;gt;0.2%",&lt;br&gt;
      "not dead",&lt;br&gt;
      "not op_mini all"&lt;br&gt;
    ],&lt;br&gt;
    "development": [&lt;br&gt;
      "last 1 chrome version",&lt;br&gt;
"last 1 firefox version",&lt;br&gt;
      "last 1 safari version"&lt;br&gt;
    ]&lt;br&gt;
  }&lt;br&gt;
}&lt;/p&gt;

</description>
      <category>react</category>
      <category>yarn</category>
      <category>css</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
