jamesknelson / create-react-blog

Start and deploy your own statically rendered blog with create-react-app
https://create-react-blog.netlify.com/
MIT License
550 stars 69 forks source link

Having trouble deploying to netlify #15

Closed adventurini closed 5 years ago

adventurini commented 5 years ago

I am no Netlify expert, but I have deployed enough sites to think this may be a unique issue to create-react-blog.

Expected Behavior

Run Netlify deployment and have a working site.

Steps to reproduce

I forked this repo, made some minimal edits, attempted to deploy on Netlify (both vanilla, as well as using yarn build, as well as using the Netlify CLI) and it does not work. I receive a site not found error.

Build Log

10:19:18 AM: 0 10:19:03 AM: Waiting to build. Currently running 2 concurrent builds on your account 10:19:03 AM: Build ready to start 10:19:06 AM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63 10:19:06 AM: build-image tag: v3.3.2 10:19:06 AM: buildbot version: 75cd99f62ada9e21edea53208e8baf0eab85a045 10:19:07 AM: Fetching cached dependencies 10:19:07 AM: Failed to fetch cache, continuing with build 10:19:07 AM: Starting to prepare the repo for build 10:19:08 AM: No cached dependencies found. Cloning fresh repo 10:19:08 AM: git clone git@github.com:adventurini/ad-venturini 10:19:09 AM: Preparing Git Reference refs/heads/master 10:19:09 AM: Found netlify.toml. Overriding site configuration 10:19:09 AM: Different publish path detected, going to use the one specified in the toml file: '.' versus './build' in the site 10:19:09 AM: Different functions path detected, going to use the one specified in the toml file: 'functions' versus '' in the site 10:19:09 AM: Creating functions prep folder 10:19:09 AM: Starting build script 10:19:10 AM: Installing dependencies 10:19:11 AM: Downloading and installing node v10.16.0... 10:19:11 AM: Downloading https://nodejs.org/dist/v10.16.0/node-v10.16.0-linux-x64.tar.xz... 10:19:12 AM:

6.0%

10:19:12 AM: ################################################# 10:19:12 AM: 68.2% 10:19:12 AM: ################################# 10:19:12 AM: ####################################### 100.0% 10:19:12 AM: Computing checksum with sha256sum 10:19:12 AM: Checksums matched! 10:19:15 AM: Now using node v10.16.0 (npm v6.9.0) 10:19:15 AM: Attempting ruby version 2.6.2, read from environment 10:19:17 AM: Using ruby version 2.6.2 10:19:17 AM: Using PHP version 5.6 10:19:17 AM: Started restoring cached node modules 10:19:17 AM: Finished restoring cached node modules 10:19:17 AM: Started restoring cached yarn cache 10:19:17 AM: Finished restoring cached yarn cache 10:19:17 AM: Installing yarn at version 1.13.0 10:19:17 AM: Installing Yarn! 10:19:17 AM: > Downloading tarball... 10:19:17 AM: [1/2]: https://yarnpkg.com/downloads/1.13.0/yarn-v1.13.0. 10:19:17 AM: tar.gz --> /tmp/yarn.tar.gz.Nqiz1dOmH5 10:19:17 AM: % Total % Received % Xfe 10:19:17 AM: rd Average Speed Time Time Time Current 10:19:17 AM: Dload Upload Total Spent Left Speed 10:19:17 AM: 0 0 0 0 0 0 10:19:17 AM: 0 0 --:--:-- --:--:-- --:--:- 10:19:17 AM: - 0 10:19:17 AM: 100 93 100 93 0 0 279 0 10:19:17 AM: --:--:-- --:--:-- --:--:-- 279 10:19:17 AM: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 10:19:18 AM: 100 609 0 609 0 0 658 0 - 10:19:18 AM: -:--:-- --:--:-- --:--:-- 1037 10:19:18 AM: 2 10:19:18 AM: 5 10:19:18 AM: 1 10:19:18 AM: 1 10:19:18 AM: 4 10:19:18 AM: 2 10:19:18 AM: k 10:19:18 AM: 2 10:19:18 AM: 5 10:19:18 AM: 2 10:19:18 AM: 8 10:19:18 AM: 7 10:19:18 AM: k 10:19:18 AM: 0 10:19:18 AM: 2 10:19:18 AM: 1 10:19:18 AM: 3 10:19:18 AM: k 10:19:18 AM: 0 10:19:18 AM: 0 10:19:18 AM: : 10:19:18 AM: 0 10:19:18 AM: 0 10:19:18 AM: : 10:19:18 AM: 0 10:19:18 AM: 5 10:19:18 AM: 0 10:19:18 AM: : 10:19:18 AM: 0 10:19:18 AM: 0 10:19:18 AM: : 10:19:18 AM: 0 10:19:18 AM: 1 10:19:18 AM: 0 10:19:18 AM: : 10:19:18 AM: 0 10:19:18 AM: 0 10:19:18 AM: : 10:19:18 AM: 0 10:19:18 AM: 4 10:19:18 AM: 2 10:19:18 AM: 1 10:19:18 AM: 3 10:19:18 AM: k 10:19:18 AM: 100 1142k 100 1142k 0 0 811k 0 0:00:01 0 10:19:18 AM: :00:01 --:--:-- 14.3M 10:19:18 AM: [2/2]: https://yarnpkg.com/download 10:19:18 AM: s/1.13.0/yarn-v1.13.0.tar.gz.asc --> /tmp/yarn.tar.gz.Nqiz1dOmH5.asc 10:19:18 AM: 100 97 100 97 0 0 2453 10:19:18 AM: 0 --:--:-- --:--:-- --:--:-- 2453 10:19:18 AM: 100 613 0 613 0 0 3195 0 --:--:-- --:--:-- --:--:-- 3195 10:19:19 AM: 100 832 100 832 0 0 3640 0 --:--:-- -- 10:19:19 AM: :--:-- --:--:-- 3640 10:19:19 AM: > Verifying integrity... 10:19:19 AM: gpg: Signature made Tue 18 Dec 2018 04:04:55 PM UTC using RSA key ID B6FF4DE3 10:19:19 AM: gpg: Good signature from "Yarn Packaging yarn@dan.cx" 10:19:19 AM: gpg: Note: This key has expired! 10:19:19 AM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907 BBB7 1646 B01B 86E5 0310 10:19:19 AM: Subkey fingerprint: E219 30C4 D0A4 AA46 1858 1F7A E074 D16E B6FF 4DE3 10:19:19 AM: > GPG signature looks good 10:19:19 AM: > Extracting to ~/.yarn... 10:19:19 AM: > Adding to $PATH... 10:19:19 AM: > We've added the following to your /opt/buildhome/.profile 10:19:19 AM: > If this isn't the profile of your current shell then please add the following to your correct profile: 10:19:19 AM: export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" 10:19:19 AM: 10:19:19 AM: > Successfully installed Yarn 1.13.0! Please open another terminal where the yarn command will now be available. 10:19:20 AM: Installing NPM modules using Yarn version 1.13.0 10:19:21 AM: yarn install v1.13.0 10:19:21 AM: [1/4] Resolving packages... 10:19:22 AM: [2/4] Fetching packages... 10:19:44 AM: info fsevents@1.2.9: The platform "linux" is incompatible with this module. 10:19:44 AM: info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation. 10:19:44 AM: info fsevents@2.0.6: The platform "linux" is incompatible with this module. 10:19:44 AM: info "fsevents@2.0.6" is an optional dependency and failed compatibility check. Excluding it from installation. 10:19:44 AM: [3/4] Linking dependencies... 10:19:44 AM: warning "react-scripts-mdx > @typescript-eslint/eslint-plugin@1.6.0" has unmet peer dependency "typescript@". 10:19:44 AM: warning "react-scripts-mdx > @typescript-eslint/parser@1.6.0" has unmet peer dependency "typescript@". 10:19:44 AM: warning "react-scripts-mdx > @typescript-eslint/eslint-plugin > @typescript-eslint/typescript-estree@1.6.0" has unmet peer dependency "typescript@*". 10:19:44 AM: warning "react-scripts-mdx > @typescript-eslint/eslint-plugin > tsutils@3.14.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev". 10:19:53 AM: [4/4] Building fresh packages... 10:19:54 AM: Done in 33.37s. 10:19:54 AM: NPM modules installed using Yarn 10:19:54 AM: Started restoring cached go cache 10:19:54 AM: Finished restoring cached go cache 10:19:54 AM: unset GOOS; 10:19:54 AM: unset GOARCH; 10:20:22 AM: Starting post processing 10:19:54 AM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64'; 10:20:23 AM: Post processing done 10:19:54 AM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}"; 10:20:25 AM: Site is live 10:19:54 AM: go version >&2; 10:19:54 AM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env'; 10:19:54 AM: go version go1.12 linux/amd64 10:19:54 AM: Installing missing commands 10:19:54 AM: Verify run directory 10:19:54 AM: Executing user command: yarn build 10:19:55 AM: yarn run v1.16.0 10:19:55 AM: $ react-scripts build && navi-scripts build 10:19:56 AM: Creating an optimized production build... 10:20:17 AM: Compiled with warnings. 10:20:17 AM: ./src/components/BlogIndexPage.js 10:20:17 AM: Line 25: Using target="_blank" without rel="noopener noreferrer" is a security risk: see https://mathiasbynens.github.io/rel-noopener react/jsx-no-target-blank 10:20:17 AM: Search for the keywords to learn more about each warning. 10:20:17 AM: To ignore, add // eslint-disable-next-line to the line before. 10:20:17 AM: File sizes after gzip: 10:20:17 AM: 86.91 KB build/static/js/2.c8eb945f.chunk.js 10:20:17 AM: 3.69 KB build/static/js/7.e15d1b99.chunk.js 10:20:17 AM: 3.6 KB build/static/js/main.e8912a11.chunk.js 10:20:17 AM: 2.03 KB build/static/css/main.de3e8d93.chunk.css 10:20:17 AM: 1.46 KB build/static/js/runtime~main.3c8fda50.js 10:20:17 AM: 1.32 KB build/static/js/3.b0895251.chunk.js 10:20:17 AM: 528 B build/static/js/4.32f4b45e.chunk.js 10:20:17 AM: 260 B build/static/js/6.921bf281.chunk.js 10:20:17 AM: 254 B build/static/css/3.17727e1f.chunk.css 10:20:17 AM: 212 B build/static/js/5.51d36a0d.chunk.js 10:20:17 AM: 202 B build/static/css/4.15f7c63d.chunk.css 10:20:17 AM: The project was built assuming it is hosted at the server root. 10:20:17 AM: You can control this with the homepage field in your package.json. 10:20:17 AM: For example, add this to build it for GitHub Pages: 10:20:17 AM: "homepage" : "http://myname.github.io/myapp", 10:20:17 AM: The build folder is ready to be deployed. 10:20:17 AM: You may serve it with a static server: 10:20:17 AM: yarn global add serve 10:20:17 AM: serve -s build 10:20:17 AM: Find out more about deployment here: 10:20:17 AM: https://bit.ly/CRA-deploy 10:20:18 AM: navi-scripts: Using config at /opt/build/repo/navi.config.js 10:20:45 AM: Shutting down logging, 34 messages pending

toml file

[build] command = "yarn build" functions = "functions" publish = "."

[[redirects]] from = "/*" to = "/index.html" status = 200

jamesknelson commented 5 years ago

Not sure what's going on here sorry. Did the site work when you tried serving it locally?

adventurini commented 5 years ago

It just needed a base command in the netlify.toml file because it deploys from something other than the root directory.

dheerajmpai commented 4 years ago

npm install typescript@>=2.8.0