Vagr9K / gatsby-advanced-starter

A high performance skeleton starter for GatsbyJS with an advanced feature set.
https://amaranth-demo.netlify.app/
MIT License
1.56k stars 405 forks source link

Build failing #163

Closed vasfvitor closed 2 years ago

vasfvitor commented 3 years ago

Hi, I'm trying do deploy but I'm having a hard time, I've tried both Gatsby Cloud, CloudFlare Pages and Netlify.

In netlify I got this:

2:05:23 PM: success Building HTML renderer - 17.412s 2:05:27 PM: failed Building static HTML for pages - 3.999s 2:05:27 PM: error "window" is not available during server side rendering.

And in Gatsby Cloud:

✓ Restoring previous build cache and dependencies 0.99s ✘ Install project dependencies 22.05s

The steps:

1.Fork this repo https://github.com/Vagr9K/gatsby-advanced-starter 2.Deploy in Netlify or Gatsby Cloud

I can develop normally in localhost, although I get a lot of YN0002 errors, but when I try to build it fails. The only that I get to work out of the box was the https://github.com/Vagr9K/gatsby-material-starter

Thanks.

Vagr9K commented 3 years ago

Can you paste a more detailed log? Like which dependencies fail to install.

Currently the starter is deployed on Netlify from the master branch and I haven't noticed any issues so far.

These are the settings it uses for the deploy: https://github.com/Vagr9K/gatsby-advanced-starter/blob/master/netlify.toml

vasfvitor commented 3 years ago

Sure. These are the exact settings that Netlify used (I highlighted in log), but in Gatsby Cloud I didn't configure nothing.

Click to expand netlify log 1:55:15 PM: Build ready to start 1:55:17 PM: build-image version: 081db65c3e4ce8423fedb40e7689a87de6f84667 1:55:17 PM: build-image tag: v4.3.1 1:55:17 PM: buildbot version: bf86becb3b64047b45100762404248f06b4aad75 1:55:17 PM: Fetching cached dependencies 1:55:17 PM: Starting to download cache of 541.0MB 1:55:24 PM: Finished downloading cache in 7.40436268s 1:55:24 PM: Starting to extract cache 1:55:42 PM: Finished extracting cache in 17.726611647s 1:55:42 PM: Finished fetching cache in 25.254183174s 1:55:42 PM: Starting to prepare the repo for build 1:55:42 PM: Preparing Git Reference refs/heads/master 1:55:43 PM: Parsing package.json dependencies **1:55:44 PM: Different build command detected, going to use the one specified in the Netlify configuration file: 'yarn build' versus 'gatsby build' in the Netlify UI** 1:55:44 PM: Starting build script 1:55:44 PM: Installing dependencies 1:55:44 PM: Python version set to 2.7 1:55:44 PM: Started restoring cached node version 1:55:47 PM: Finished restoring cached node version 1:55:47 PM: v16.6.1 is already installed. **1:55:48 PM: Now using node v16.6.1 (npm v7.20.3)** 1:55:48 PM: Started restoring cached build plugins 1:55:48 PM: Finished restoring cached build plugins 1:55:48 PM: Attempting ruby version 2.7.2, read from environment 1:55:49 PM: Using ruby version 2.7.2 1:55:49 PM: Using PHP version 8.0 1:55:49 PM: Started restoring cached yarn cache 1:55:49 PM: Finished restoring cached yarn cache 1:55:51 PM: Found yarn version (3.0.0) that doesn't match expected (1.22.11) 1:55:51 PM: up to date, audited 1 package in 288ms 1:55:51 PM: found 0 vulnerabilities **1:55:51 PM: Installing yarn at version 1.22.11** 1:55:51 PM: Installing Yarn! 1:55:51 PM: > Downloading tarball... 1:55:51 PM: [1/2]: https://yarnpkg.com/downloads/1.22.11/yarn-v1.22.11.tar.gz --> /tmp/yarn.tar.gz.wKGd67n0Fu 1:55:51 PM: % Total % Received % Xferd Average Speed Time Time Time Current 1:55:51 PM: Dload Upload Total Spent Left Speed 1:55:52 PM: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 1:55:52 PM: 100 81 100 81 0 0 586 0 --:--:-- --:--:-- --:--:-- 586 1:55:52 PM: 100 95 100 95 0 0 222 0 --:--:-- --:--:-- --:--:-- 222 1:55:52 PM: 100 626 100 626 0 0 1187 0 --:--:-- --:--:-- --:--:-- 1187 1:55:52 PM: 3 1216k 3 41027 0 0 66494 0 0:00:18 --:--:-- 0:00:18 66494 1:55:52 PM: 100 1216k 100 1216k 0 0 1781k 0 --:--:-- --:--:-- --:--:-- 17.4M 1:55:52 PM: [2/2]: https://yarnpkg.com/downloads/1.22.11/yarn-v1.22.11.tar.gz.asc --> /tmp/yarn.tar.gz.wKGd67n0Fu.asc 1:55:52 PM: % Total % Received % Xferd Average Speed Time Time Time Current 1:55:52 PM: Dload Upload Total Spent Left Speed 1:55:52 PM: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 1:55:52 PM: 100 85 100 85 0 0 1307 0 --:--:-- --:--:-- --:--:-- 1307 1:55:53 PM: 100 99 100 99 0 0 109 0 --:--:-- --:--:-- --:--:-- 109 1:55:53 PM: 100 99 100 99 0 0 109 0 --:--:-- --:--:-- --:--:-- 0 1:55:53 PM: 100 630 100 630 0 0 624 0 0:00:01 0:00:01 --:--:-- 624 1:55:53 PM: 100 1028 100 1028 0 0 963 0 0:00:01 0:00:01 --:--:-- 963 1:55:53 PM: > Verifying integrity... 1:55:53 PM: gpg: Signature made Mon 26 Jul 2021 05:27:27 PM UTC 1:55:53 PM: gpg: using RSA key 6D98490C6F1ACDDD448E45954F77679369475BAA 1:55:53 PM: gpg: Good signature from "Yarn Packaging " [unknown] 1:55:53 PM: gpg: WARNING: This key is not certified with a trusted signature! 1:55:53 PM: gpg: There is no indication that the signature belongs to the owner. 1:55:53 PM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907 BBB7 1646 B01B 86E5 0310 1:55:53 PM: Subkey fingerprint: 6D98 490C 6F1A CDDD 448E 4595 4F77 6793 6947 5BAA 1:55:53 PM: > GPG signature looks good 1:55:53 PM: > Extracting to ~/.yarn... 1:55:53 PM: > Adding to $PATH... 1:55:54 PM: > Successfully installed Yarn 1.22.11! Please open another terminal where the `yarn` command will now be available. 1:55:54 PM: Yarn workspaces detected 1:55:54 PM: Started restoring workspace root node modules 1:55:54 PM: Finished restoring workspace root node modules 1:55:55 PM: Installing NPM modules using Yarn version 3.0.0 1:55:56 PM: ➤ YN0050: The cache-folder option has been deprecated; use rc settings instead 1:55:56 PM: ➤ YN0000: ┌ Resolution step 1:55:57 PM: ➤ YN0002: │ @endemolshinegroup/cosmiconfig-typescript-loader@npm:3.0.2 [2a7bd] doesn't provide typescript (p0a01e), requested by ts-node➤ YN0002: │ apollo-link-context@npm:1.0.20 doesn't provide graphql (pa199c), requested by apollo-link➤ YN0002: │ eslint-config-airbnb-typescript@npm:12.3.1 doesn't provide eslint (p6e2aa), requested by eslint-config-airbnb-base➤ YN0002: │ eslint-config-airbnb-typescript@npm:12.3.1 doesn't provide eslint (p3e7d6), requested by @typescript-eslint/parser➤ YN0002: │ eslint-config-airbnb-typescript@npm:12.3.1 doesn't provide eslint (p1d9db), requested by eslint-config-airbnb➤ YN0002: │ eslint-config-airbnb-typescript@npm:12.3.1 doesn't provide eslint-plugin-import (p4f5e3), requested by eslint-config-airbnb-base➤ YN0002: │ eslint-config-airbnb-typescript@npm:12.3.1 doesn't provide eslint-plugin-import (p98c99), requested by eslint-config-airbnb➤ YN0002: │ eslint-config-airbnb-typescript@npm:12.3.1 doesn't provide eslint-plugin-jsx-a11y (p220ec), requested by eslint-config-airbnb➤ YN0002: │ eslint-config-airbnb-typescript@npm:12.3.1 doesn't provide eslint-plugin-react (p92df3), requested by eslint-config-airbnb➤ YN0002: │ eslint-config-airbnb-typescript@npm:12.3.1 doesn't provide eslint-plugin-react-hooks (pa6140), requested by eslint-config-airbnb➤ YN0002: │ gatsby-plugin-lodash@npm:4.14.0 [c0230] doesn't provide webpack (p20396), requested by lodash-webpack-plugin➤ YN0002: │ gatsby-starter-advanced@workspace:. doesn't provide @babel/core (p26bfe), requested by babel-jest➤ YN0060: │ gatsby-starter-advanced@workspace:. provides @types/jest (p8e488) with version 26.0.24, which doesn't satisfy what ts-jest requests➤ YN0002: │ gatsby-starter-advanced@workspace:. doesn't provide @typescript-eslint/parser (pa0af2), requested by @typescript-eslint/eslint-plugin➤ YN0002: │ gatsby-starter-advanced@workspace:. doesn't provide axe-core (pb209e), requested by cypress-axe➤ YN0060: │ gatsby-starter-advanced@workspace:. provides cypress (p65ac1) with version 8.4.1, which doesn't satisfy what gatsby-cypress requests➤ YN0060: │ gatsby-starter-advanced@workspace:. provides react (pc5aff) with version 17.0.2, which doesn't satisfy what gatsby-theme-amaranth and some of its descendants request➤ YN0060: │ gatsby-starter-advanced@workspace:. provides react-dom (pdb53c) with version 17.0.2, which doesn't satisfy what gatsby-theme-amaranth and some of its descendants request➤ YN0002: │ gatsby-starter-advanced@workspace:. doesn't provide react-is (pb5fe3), requested by styled-components➤ YN0002: │ gatsby-theme-advanced-demo@workspace:examples/advanced-demo doesn't provide @babel/core (pbc03f), requested by babel-jest➤ YN0002: │ gatsby-theme-advanced-demo@workspace:examples/advanced-demo doesn't provide @babel/core (pbe866), requested by babel-preset-gatsby➤ YN0002: │ gatsby-theme-advanced-demo@workspace:examples/advanced-demo doesn't provide @babel/core (pcc5c1), requested by gatsby-plugin-image➤ YN0002: │ gatsby-theme-advanced-demo@workspace:examples/advanced-demo doesn't provide @mdx-js/mdx (p7506f), requested by gatsby-plugin-mdx➤ YN0002: │ gatsby-theme-advanced-demo@workspace:examples/advanced-demo doesn't provide @mdx-js/react (pd8a3d), requested by gatsby-plugin-mdx➤ YN0060: │ gatsby-theme-advanced-demo@workspace:examples/advanced-demo provides @types/jest (p58410) with version 26.0.24, which doesn't satisfy what ts-jest requests➤ YN0002: │ gatsby-theme-advanced-demo@workspace:examples/advanced-demo doesn't provide @typescript-eslint/parser (p9aa94), requested by @typescript-eslint/eslint-plugin➤ YN0002: │ gatsby-theme-advanced-demo@workspace:examples/advanced-demo doesn't provide core-js (p22783), requested by babel-preset-gatsby➤ YN0060: │ gatsby-theme-advanced-demo@workspace:examples/advanced-demo provides cypress (p416d9) with version 8.4.1, which doesn't satisfy what gatsby-cypress requests➤ YN0002: │ gatsby-theme-advanced-demo@workspace:examples/advanced-demo doesn't provide gatsby-plugin-sharp (pdb134), requested by gatsby-plugin-image➤ YN0002: │ gatsby-theme-advanced-demo@workspace:examples/advanced-demo doesn't provide gatsby-source-filesystem (pc70a5), requested by gatsby-plugin-image➤ YN0060: │ gatsby-theme-advanced@workspace:themes/advanced provides @types/jest (p9ee5f) with version 26.0.24, which doesn't satisfy what ts-jest requests➤ YN0002: │ gatsby-theme-advanced@workspace:themes/advanced doesn't provide @typescript-eslint/parser (p649b3), requested by @typescript-eslint/eslint-plugin➤ YN0002: │ gatsby-theme-advanced@workspace:themes/advanced doesn't provide core-js (p5b473), requested by babel-preset-gatsby➤ YN0002: │ gatsby-theme-advanced@workspace:themes/advanced doesn't provide graphql (pc0bd5), requested by eslint-plugin-graphql➤ YN0060: │ gatsby-theme-advanced@workspace:themes/advanced [c0230] provides @types/jest (pa1884) with version 26.0.24, which doesn't satisfy what ts-jest requests➤ YN0002: │ gatsby-theme-advanced@workspace:themes/advanced [c0230] doesn't provide @typescript-eslint/parser (p9701f), requested by @typescript-eslint/eslint-plugin➤ YN0002: │ gatsby-theme-advanced@workspace:themes/advanced [c0230] doesn't provide core-js (p20a8e), requested by babel-preset-gatsby➤ YN0002: │ gatsby-theme-advanced@workspace:themes/advanced [c0230] doesn't provide graphql (pd262f), requested by eslint-plugin-graphql➤ YN0002: │ gatsby-theme-amaranth-demo@workspace:examples/amaranth-demo doesn't provide @babel/core (pa9050), requested by babel-jest➤ YN0060: │ gatsby-theme-amaranth-demo@workspace:examples/amaranth-demo provides @types/jest (p17e80) with version 26.0.24, which doesn't satisfy what ts-jest requests➤ YN0002: │ gatsby-theme-amaranth-demo@workspace:examples/amaranth-demo doesn't provide @typescript-eslint/parser (p7b4b3), requested by @typescript-eslint/eslint-plugin➤ YN0060: │ gatsby-theme-amaranth-demo@workspace:examples/amaranth-demo provides cypress (paba22) with version 8.4.1, which doesn't satisfy what gatsby-cypress requests➤ YN0060: │ gatsby-theme-amaranth-demo@workspace:examples/amaranth-demo provides react (p2736e) with version 17.0.2, which doesn't satisfy what gatsby-theme-amaranth and some of its descendants request➤ YN0060: │ gatsby-theme-amaranth-demo@workspace:examples/amaranth-demo provides react-dom (p8d7dd) with version 17.0.2, which doesn't satisfy what gatsby-theme-amaranth and some of its descendants request➤ YN0002: │ gatsby-theme-amaranth-demo@workspace:examples/amaranth-demo doesn't provide react-is (p182dc), requested by styled-components➤ YN0002: │ gatsby-theme-amaranth@workspace:themes/amaranth doesn't provide @testing-library/dom (p70b2f), requested by @testing-library/user-event➤ YN0060: │ gatsby-theme-amaranth@workspace:themes/amaranth provides @types/jest (p49fb1) with version 26.0.24, which doesn't satisfy what ts-jest requests➤ YN0002: │ gatsby-theme-amaranth@workspace:themes/amaranth doesn't provide @typescript-eslint/parser (p98027), requested by @typescript-eslint/eslint-plugin➤ YN0002: │ gatsby-theme-amaranth@workspace:themes/amaranth doesn't provide core-js (pca8a3), requested by babel-preset-gatsby➤ YN0002: │ gatsby-theme-amaranth@workspace:themes/amaranth doesn't provide graphql (p2dc3f), requested by eslint-plugin-graphql➤ YN0002: │ gatsby-theme-amaranth@workspace:themes/amaranth doesn't provide react-is (p05737), requested by styled-components➤ YN0002: │ gatsby-theme-amaranth@workspace:themes/amaranth [2bf39] doesn't provide @testing-library/dom (pd02a7), requested by @testing-library/user-event➤ YN0060: │ gatsby-theme-amaranth@workspace:themes/amaranth [2bf39] provides @types/jest (pa2df1) with version 26.0.24, which doesn't satisfy what ts-jest requests➤ YN0002: │ gatsby-theme-amaranth@workspace:themes/amaranth [2bf39] doesn't provide @typescript-eslint/parser (pfc083), requested by @typescript-eslint/eslint-plugin➤ YN0002: │ gatsby-theme-amaranth@workspace:themes/amaranth [2bf39] doesn't provide core-js (pc2185), requested by babel-preset-gatsby➤ YN0002: │ gatsby-theme-amaranth@workspace:themes/amaranth [2bf39] doesn't provide graphql (p44da3), requested by eslint-plugin-graphql➤ YN0002: │ gatsby-theme-amaranth@workspace:themes/amaranth [2bf39] doesn't provide react-is (pb7414), requested by styled-components➤ YN0002: │ gatsby@npm:3.14.0 [2bf39] doesn't provide babel-eslint (p8ac51), requested by eslint-config-react-app➤ YN0002: │ netlify-cms-ui-default@npm:2.15.2 [9a221] doesn't provide react-dom (pfb392), requested by react-transition-group➤ YN0002: │ netlify-cms-widget-code@npm:1.3.3 [9a221] doesn't provide react-dom (pe8000), requested by react-select➤ YN0002: │ netlify-cms-widget-colorstring@npm:1.1.1 [9a221] doesn't provide react-dom (p622e8), requested by validate-color➤ YN0002: │ netlify-cms-widget-datetime@npm:2.7.4 [9a221] doesn't provide moment (p545a7), requested by react-datetime➤ YN0002: │ netlify-cms-widget-file@npm:2.11.1 [9a221] doesn't provide react-dom (p2c4ff), requested by react-sortable-hoc➤ YN0002: │ netlify-cms-widget-list@npm:2.10.1 [9a221] doesn't provide react-dom (p65ca9), requested by react-sortable-hoc➤ YN0002: │ netlify-cms-widget-relation@npm:2.10.4 [9a221] doesn't provide react-dom (p0bba4), requested by react-select➤ YN0002: │ netlify-cms-widget-relation@npm:2.10.4 [9a221] doesn't provide react-dom (p46d10), requested by react-window➤ YN0002: │ netlify-cms-widget-select@npm:2.8.2 [9a221] doesn't provide react-dom (pf084e), requested by react-select➤ YN0002: │ react-dev-utils@npm:11.0.4 doesn't provide typescript (p79ddf), requested by fork-ts-checker-webpack-plugin➤ YN0002: │ react-dev-utils@npm:11.0.4 doesn't provide webpack (p2af19), requested by fork-ts-checker-webpack-plugin➤ YN0002: │ redux-notifications@npm:4.0.1 [2157d] doesn't provide redux (p69b9c), requested by react-redux➤ YN0002: │ write-good@npm:1.0.8 doesn't provide eslint-plugin-import (p9cc40), requested by no-cliches➤ YN0002: │ write-good@npm:1.0.8 doesn't provide eslint-plugin-jsx-a11y (p178a8), requested by no-cliches➤ YN0002: │ write-good@npm:1.0.8 doesn't provide eslint-plugin-react (pf6643), requested by no-cliches➤ YN0002: │ write-good@npm:1.0.8 doesn't provide eslint-plugin-react-hooks (p8dce7), requested by no-cliches➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements for details, where is the six-letter p-prefixed code 1:55:57 PM: ➤ YN0000: └ Completed in 0s 633ms 1:55:57 PM: ➤ YN0000: ┌ Fetch step 1:57:38 PM: ➤ YN0066: │ typescript@patch:typescript@npm%3A4.4.3#~builtin::version=4.4.3&hash=d8b4e7: Cannot apply hunk #14 1:57:39 PM: ➤ YN0013: │ 4 packages were already cached, 2549 had to be fetched 1:57:39 PM: ➤ YN0000: └ Completed in 1m 42s 1:57:39 PM: ➤ YN0000: ┌ Link step 1:57:40 PM: ➤ YN0062: │ fsevents@patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=1cc4b2 The platform linux is incompatible with this module, link skipped. 1:57:48 PM: ➤ YN0007: │ cypress@npm:8.4.1 must be built because it never has been before or the last one failed 1:57:48 PM: ➤ YN0007: │ core-js@npm:3.18.0 must be built because it never has been before or the last one failed 1:57:48 PM: ➤ YN0007: │ gatsby-telemetry@npm:2.14.0 must be built because it never has been before or the last one failed 1:57:48 PM: ➤ YN0007: │ sharp@npm:0.29.1 must be built because it never has been before or the last one failed 1:57:48 PM: ➤ YN0007: │ core-js-pure@npm:3.18.0 must be built because it never has been before or the last one failed 1:57:48 PM: ➤ YN0007: │ core-js@npm:2.6.12 must be built because it never has been before or the last one failed 1:57:49 PM: ➤ YN0000: │ cypress@npm:8.4.1 STDOUT Note: Overriding Cypress cache directory to: ./node_modules/.cache/CypressBinary 1:57:49 PM: ➤ YN0000: │ cypress@npm:8.4.1 STDOUT 1:57:49 PM: ➤ YN0000: │ cypress@npm:8.4.1 STDOUT Previous installs of Cypress may not be found. 1:57:49 PM: ➤ YN0000: │ cypress@npm:8.4.1 STDOUT 1:57:49 PM: ➤ YN0000: │ cypress@npm:8.4.1 STDOUT 1:57:49 PM: ➤ YN0000: │ cypress@npm:8.4.1 STDOUT Cypress 8.4.1 is installed in /opt/build/repo/node_modules/.cache/CypressBinary/8.4.1 1:57:49 PM: ➤ YN0000: │ cypress@npm:8.4.1 STDOUT 1:57:50 PM: ➤ YN0000: │ sharp@npm:0.29.1 STDOUT sharp: Using existing vendored libvips v8.11.3 1:57:51 PM: ➤ YN0007: │ gatsby-cli@npm:3.14.0 must be built because it never has been before or the last one failed 1:57:51 PM: ➤ YN0007: │ gatsby@npm:3.14.0 [2bf39] must be built because it never has been before or the last one failed 1:57:51 PM: ➤ YN0000: └ Completed in 12s 578ms 1:57:52 PM: ➤ YN0000: Done with warnings in 1m 56s 1:57:53 PM: NPM modules installed using Yarn 1:57:54 PM: Started restoring cached go cache 1:57:54 PM: Finished restoring cached go cache 1:57:54 PM: go version go1.16.5 linux/amd64 1:57:54 PM: go version go1.16.5 linux/amd64 1:57:54 PM: Installing missing commands 1:57:54 PM: Verify run directory 1:57:55 PM: ​ 1:57:55 PM: ──────────────────────────────────────────────────────────────── 1:57:55 PM: Netlify Build 1:57:55 PM: ──────────────────────────────────────────────────────────────── 1:57:55 PM: ​ 1:57:55 PM: ❯ Version 1:57:55 PM: @netlify/build 18.11.2 1:57:55 PM: ​ 1:57:55 PM: ❯ Flags 1:57:55 PM: baseRelDir: true 1:57:55 PM: buildId: 614a0e73e9a66b00b1b00bff 1:57:55 PM: deployId: 614a0e73e9a66b00b1b00c01 1:57:55 PM: ​ 1:57:55 PM: ❯ Current directory 1:57:55 PM: /opt/build/repo 1:57:55 PM: ​ 1:57:55 PM: ❯ Config file 1:57:55 PM: /opt/build/repo/netlify.toml 1:57:55 PM: ​ 1:57:55 PM: ❯ Context 1:57:55 PM: production 1:57:55 PM: ​ 1:57:55 PM: ──────────────────────────────────────────────────────────────── 1:57:55 PM: 1. build.command from netlify.toml 1:57:55 PM: ──────────────────────────────────────────────────────────────── 1:57:55 PM: ​ 1:57:55 PM: $ yarn build 1:58:02 PM: success open and validate gatsby-configs, load plugins - 2.614s 1:58:02 PM: success onPreInit - 0.013s 1:58:02 PM: success initialize cache - 0.074s 1:58:02 PM: success copy gatsby files - 0.078s 1:58:03 PM: success Compiling Gatsby Functions - 0.388s 1:58:03 PM: success onPreBootstrap - 0.404s 1:58:04 PM: success createSchemaCustomization - 0.676s 1:58:08 PM: warning unable to find prism language 'no-highlight' for highlighting. applying generic code block 1:58:09 PM: success Checking for changed pages - 0.000s 1:58:09 PM: success source and transform nodes - 5.207s 1:58:10 PM: success building schema - 1.425s 1:58:21 PM: warning Your GraphQL query in createPages took 10.96 seconds which is an unexpectedly long time. See https://gatsby.dev/create-pages-performance for tips on how to improve this. 1:58:26 PM: success createPages - 15.572s 1:58:32 PM: success createPagesStatefully - 6.412s 1:58:32 PM: info Total nodes: 174, SitePage nodes: 38 (use --verbose for breakdown) 1:58:32 PM: success Checking for changed pages - 0.000s 1:58:33 PM: success update schema - 1.093s 1:58:33 PM: success onPreExtractQueries - 0.000s 1:58:46 PM: success extract queries from components - 12.323s 1:58:46 PM: success write out redirect data - 0.009s 1:58:48 PM: warning The icon(content/logos/logo_cr_preto.png) you provided to 'gatsby-plugin-manifest' is not square. 1:58:48 PM: The icons we generate will be square and for the best results we recommend you provide a square icon. 1:58:48 PM: success Build manifest and related icons - 0.115s 1:58:48 PM: success onPostBootstrap - 2.254s 1:58:48 PM: info bootstrap finished - 50.983s 1:58:52 PM: success run static queries - 4.114s - 1/1 0.24/s 1:58:57 PM: success run page queries - 5.085s - 38/38 7.47/s 1:58:57 PM: success write out requires - 0.011s 2:05:05 PM: success Building production JavaScript and CSS bundles - 368.152s 2:05:05 PM: success Rewriting compilation hashes - 0.009s 2:05:05 PM: success Writing page-data.json files to public directory - 0.045s - 38/38 845.85/s 2:05:23 PM: success Building HTML renderer - 17.412s 2:05:27 PM: failed Building static HTML for pages - 3.999s 2:05:27 PM: error "window" is not available during server side rendering. 2:05:27 PM: 2:05:27 PM: > 1 | !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define("NetlifyCmsApp",["react","react-dom"],t):"object"==typeof exports?exports.NetlifyCmsApp=t(require("react"),require("react-dom")):e.NetlifyCmsApp=t(e.React,e.ReactDOM)}(window,(function(__WEBPACK_EXTERNAL_MODULE__0__,__WEBPACK_EXTERNAL_MODULE__55__){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1905)}([function(e,t){e.exports=__WEBPACK_EXTERNAL_MODULE__0__},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}n.d(t,"a",(function(){return S})),n.d(t,"b",(function(){return M})),n.d(t,"c",(function(){return U})),n.d(t,"d",(function(){return I})),n.d(t,"e",(function(){return O})),n.d(t,"f",(function(){return F})),n.d(t,"g",(function(){return E})),n.d(t,"h",(function(){return r})),n.d(t,"i",(function(){return a})),n.d(t,"j",(function(){return i})),n.d(t,"k",(function(){return C})),n.d(t,"l",(function(){return s})),n.d(t,"m",(function(){return B})),n.d(t,"n",(function(){return D})),n.d(t,"o",(function(){return y})),n.d(t,"p",(function(){return L})),n.d(t,"q",(function(){return l})),n.d(t,"r",(function(){return g})),n.d(t,"s",(function(){return v})),n.d(t,"t",(function(){return u})),n.d(t,"u",(function(){return T})),n.d(t,"v",(function(){return N})),n.d(t,"w",(function(){return h})),n.d(t,"x",(function(){return b})),n.d(t,"y",(function(){return m}));var S={ANCHOR:"&",COMMENT:"#",TAG:"!",DIRECTIVES_END:"-",DOCUMENT_END:"."},O={ALIAS:"ALIAS",BLANK_LINE:"BLANK_LINE",BLOCK_FOLDED:"BLOCK_FOLDED",BLOCK_LITERAL:"BLOCK_LITERAL",COMMENT:"COMMENT",DIRECTIVE:"DIRECTIVE",DOCUMENT:"DOCUMENT",FLOW_MAP:"FLOW_MAP",FLOW_SEQ:"FLOW_SEQ",MAP:"MAP",MAP_KEY:"MAP_KEY",MAP_VALUE:"MAP_VALUE",PLAIN:"PLAIN",QUOTE_DOUBLE:"QUOTE_DOUBLE",QUOTE_SINGLE:"QUOTE_SINGLE",SEQ:"SEQ",SEQ_ITEM:"SEQ_ITEM"},C="tag:yaml.org,2002:",T={MAP:"tag:yaml.org,2002:map",SEQ:"tag:yaml.org,2002:seq",STR:"tag:yaml.org,2002:str"};function A(e){for(var t=[0],n=e.indexOf("\n");-1!==n;)n+=1,t.push(n),n=e.indexOf("\n",n);return t}function P(e){var t,n;return"string"==typeof e?(t=A(e),n=e):(Array.isArray(e)&&(e=e[0]),e&&e.context&&(e.lineStarts||(e.lineStarts=A(e.context.src)),t=e.lineStarts,n=e.context.src)),{lineStarts:t,src:n}}function R(e,t){if("number"!=typeof e||e<0)return null;var n=P(t),r=n.lineStarts,i=n.src;if(!r||!i||e>i.length)return null;for(var o=0;o=1)||e>r.length)return null;for(var o=r[e-1],a=r[e];a&&a>o&&"\n"===i[a-1];)--a;return i.slice(o,a)}var I=function(){function e(t,n){i(this,e),this.start=t,this.end=n||t}return a(e,[{key:"isEmpty",value:function(){return"number"!=typeof this.start||!this.end||this.end<=this.start}},{key:"setOrigRange",value:function(e,t){var n=this.start,r=this.end;if(0===e.length||r<=e[0])return this.origStart=n,this.origEnd=r,t;for(var i=t;in);)++i;this.origStart=n+i;for(var o=i;i=r);)++i;return this.origEnd=r+i,o}}],[{key:"copy",value:function(t){return new e(t.start,t.end)}}]),e}(),M=function(){function e(t,n,r){i(this,e),Object.defineProperty(this,"context",{value:r||null,writable:!0}),this.error=null,this.range=null,this.valueRange=null,this.props=n||[],this.type=t,this.value=null}return a(e,[{key:"getPropValue",value:function(e,t,n){if(!this.context)return null;var r=this.context.src,i=this.props[e];return i&&r[i.start]===t?r.slice(i.start+(n?1:0),i.end):null}},{key:"anchor",get:function(){for(var e=0;e0?e.join("\n"):null}},{key:"commentHasRequiredWhitespace",value:function(t){var n=this.context.src;if(this.header&&t===this.header.end)return!1;if(!this.valueRange)return!1;var r=this.valueRange.end;return t!==r||e.atBlank(n,r-1)}},{key:"hasComment",get:function(){if(this.context)for(var e=this.context.src,t=0;t=t.length||"\n"===t[i]?r+"\n":r}},{key:"atDocumentBoundary",value:function(e,t,n){var r=e[t];if(!r)return!0;var i=e[t-1];if(i&&"\n"!==i)return!1;if(n){if(r!==n)return!1}else if(r!==S.DIRECTIVES_END&&r!==S.DOCUMENT_END)return!1;var o=e[t+1],a=e[t+2];if(o!==r||a!==r)return!1;var s=e[t+3];return!s||"\n"===s||"\t"===s||" "===s}},{key:"endOfIdentifier",value:function(e,t){for(var n=e[t],r="<"===n,i=r?["\n","\t"," ",">"]:["\n","\t"," ","[","]","{","}",","];n&&-1===i.indexOf(n);)n=e[t+=1];return r&&">"===n&&(t+=1),t}},{key:"endOfIndent",value:function(e,t){for(var n=e[t];" "===n;)n=e[t+=1];return t}},{key:"endOfLine",value:function(e,t){for(var n=e[t];n&&"\n"!==n;)n=e[t+=1];return t}},{key:"endOfWhiteSpace",value:function(e,t){for(var n=e[t];"\t"===n||" "===n;)n=e[t+=1];return t}},{key:"startOfLine",value:function(e,t){var n=e[t-1];if("\n"===n)return t;for(;n&&"\n"!==n;)n=e[t-=1];return t+1}},{key:"endOfBlockIndent",value:function(t,n,r){var i=e.endOfIndent(t,r);if(i>r+n)return i;var o=e.endOfWhiteSpace(t,i),a=t[o];return a&&"\n"!==a?null:o}},{key:"atBlank",value:function(e,t,n){var r=e[t];return"\n"===r||"\t"===r||" "===r||n&&!r}},{key:"nextNodeIsIndented",value:function(e,t,n){return!(!e||t<0)&&(t>0||n&&"-"===e)}},{key:"normalizeOffset",value:function(t,n){var r=t[n];return r?"\n"!==r&&"\n"===t[n-1]?n-1:e.endOfWhiteSpace(t,n):n}},{key:"foldNewline",value:function(t,n,r){for(var i=0,o=!1,a="",s=t[n+1];" "===s||"\t"===s||"\n"===s;){switch(s){case"\n":i=0,n+=1,a+="\n";break;case"\t":i<=r&&(o=!0),n=e.endOfWhiteSpace(t,n+2)-1;break;case" ":i+=1,n+=1}s=t[n+1]}return a||(a=" "),s&&i<=r&&(o=!0),{fold:a,offset:n,error:o}}}]),e}(),L=function(e){l(n,e);var t=g(n);function n(e,r,o){var a;if(i(this,n),!(o&&r instanceof M))throw new Error("Invalid arguments for new ".concat(e));return(a=t.call(this)).name=e,a.message=o,a.source=r,a}return a(n,[{key:"makePretty",value:function(){if(this.source){this.nodeType=this.source.type;var e=this.source.context&&this.source.context.root;if("number"==typeof this.offset){this.range=new I(this.offset,this.offset+1);var t=e&&R(this.offset,e);if(t){var n={line:t.line,col:t.col+1};this.linePos={start:t,end:n}}delete this.offset}else this.range=this.source.range,this.linePos=this.source.rangeAsLinePos;if(this.linePos){var r=this.linePos.start,i=r.line,o=r.col;this.message+=" at line ".concat(i,", column ").concat(o);var a=e&&function(e,t){var n=e.start,r=e.end,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:80,o=j(n.line,t);if(!o)return null;var a=n.col;if(o.length>i)if(a<=i-10)o=o.substr(0,i-1)+"…";else{var s=Math.round(i/2);o.length>a+s&&(o=o.substr(0,a+s-1)+"…"),a-=o.length-i,o="…"+o.substr(1-i)}var l=1,u="";r&&(r.line===n.line&&a+(r.col-n.col)<=i+1?l=r.col-n.col:(l=Math.min(o.length+1,i)-a,u="…"));var c=a>1?" ".repeat(a-1):"",d="^".repeat(l);return"".concat(o,"\n").concat(c).concat(d).concat(u)}(this.linePos,e);a&&(this.message+=":\n\n".concat(a,"\n"))}delete this.source}}}]),n}(p(Error)),N=function(e){l(n,e);var t=g(n);function n(e,r){return i(this,n),t.call(this,"YAMLReferenceError",e,r)}return n}(L),D=function(e){l(n,e);var t=g(n);function n(e,r){return i(this,n),t.call(this,"YAMLSemanticError",e,r)}return n}(L),F=function(e){l(n,e);var t=g(n);function n(e,r){return i(this,n),t.call(this,"YAMLSyntaxError",e,r)}return n}(L),B=function(e){l(n,e);var t=g(n);function n(e,r){return i(this,n),t.call(this,"YAMLWarning",e,r)}return n}(L),U=function(e){l(n,e);var t=g(n);function n(){return i(this,n),t.apply(this,arguments)}return a(n,[{key:"strValue",get:function(){if(!this.valueRange||!this.context)return null;for(var e=this.valueRange,t=e.start,n=e.end,r=this.context.src,i=r[n-1];tu?r.slice(u,a+1):s)}else o+=s}var d=r[t];switch(d){case"\t":return{errors:[new D(this,"Plain value cannot start with a tab character")],str:o};case"@":case"`":var f="Plain value cannot start with reserved character ".concat(d);return{errors:[new D(this,f)],str:o};default:return o}}},{key:"parseBlockValue",value:function(e){for(var t=this.context,r=t.indent,i=t.inFlow,o=t.src,a=e,s=e,l=o[a];"\n"===l&&!M.atDocumentBoundary(o,a+1);l=o[a]){var u=M.endOfBlockIndent(o,r,a+1);if(null===u||"#"===o[u])break;a="\n"===o[u]?u:s=n.endOfLine(o,u,i)}return this.valueRange.isEmpty()&&(this.valueRange.start=e),this.valueRange.end=s,s}},{key:"parse",value:function(e,t){this.context=e;var r=e.inFlow,i=e.src,o=t,a=i[o];return a&&"#"!==a&&"\n"!==a&&(o=n.endOfLine(i,t,r)),this.valueRange=new I(t,o),o=M.endOfWhiteSpace(i,o),o=this.parseComment(o),this.hasComment&&!this.valueRange.isEmpty()||(o=this.parseBlockValue(o)),o}}],[{key:"endOfLine",value:function(e,t,n){for(var r=e[t],i=t;r&&"\n"!==r&&(!n||"["!==r&&"]"!==r&&"{"!==r&&"}"!==r&&","!==r);){var o=e[i+1];if(":"===r&&(!o||"\n"===o||"\t"===o||" "===o||n&&","===o))break;if((" "===r||"\t"===r)&&"#"===o)break;i+=1,r=o}return i}}]),n}(M)},function(e,t,n){e.exports=n(793)()},function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return l})),n.d(t,"e",(function(){return u})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return d})),n.d(t,"h",(function(){return f})),n.d(t,"i",(function(){return p})),n.d(t,"j",(function(){return h})),n.d(t,"k",(function(){return m})),n.d(t,"l",(function(){return g})),n.d(t,"m",(function(){return v})),n.d(t,"n",(function(){return y})),n.d(t,"o",(function(){return b})),n.d(t,"p",(function(){return _})),n.d(t,"q",(function(){return w})),n.d(t,"r",(function(){return k})),n.d(t,"s",(function(){return E})),n.d(t,"t",(function(){return O})),n.d(t,"u",(function(){return C})),n.d(t,"v",(function(){return T})),n.d(t,"w",(function(){return A})),n.d(t,"x",(function(){return P})),n.d(t,"y",(function(){return R})),n.d(t,"z",(function(){return j})),n.d(t,"A",(function(){return I})),n.d(t,"B",(function(){return M})),n.d(t,"C",(function(){return L})),n.d(t,"D",(function(){return N})),n.d(t,"E",(function(){return D})),n.d(t,"F",(function(){return F})),n.d(t,"H",(function(){return B})),n.d(t,"I",(function(){return U})),n.d(t,"J",(function(){return z})),n.d(t,"G",(function(){return q})),n.d(t,"a",(function(){return H}));var r=n(32),i=n(205),o=n(64);function a(e){for(var t=h(),n=0,r=e.length;ni&&(u|=o.a.RIGHT),la&&(u|=o.a.ABOVE),u===o.a.UNKNOWN&&(u=o.a.INTERSECTING),u}function h(){return[1/0,1/0,-1/0,-1/0]}function m(e,t,n,r,i){return i?(i[0]=e,i[1]=t,i[2]=n,i[3]=r,i):[e,t,n,r]}function g(e){return m(1/0,1/0,-1/0,-1/0,e)}function v(e,t){var n=e[0],r=e[1];return m(n,r,n,r,t)}function y(e,t){return x(g(t),e)}function b(e,t,n,r,i){return E(g(i),e,t,n,r)}function _(e,t){return e[0]==t[0]&&e[2]==t[2]&&e[1]==t[1]&&e[3]==t[3]}function w(e,t){return t[0]e[2]&&(e[2]=t[2]),t[1]e[3]&&(e[3]=t[3]),e}function k(e,t){t[0]e[2]&&(e[2]=t[0]),t[1]e[3]&&(e[3]=t[1])}function x(e,t){for(var n=0,r=t.length;n
Click to expand Gatsby Cloud log 14:56:12 PM: Cloning into '/usr/src/app/www'... 14:56:14 PM: Found package-lock.json with lockfileversion >= 2, using node 16 14:56:14 PM: Installing node version 16 14:56:16 PM: Downloading and installing node v16.9.1... 14:56:21 PM: Now using node v16.9.1 (npm v7.21.1) 14:56:27 PM: Unknown Syntax Error: Invalid option name ("--network-timeout 600000"). $ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--mode #0] 14:56:27 PM: YARN install --non-interactive --prefer-offline --network-timeout 600000 failure - Command failed with exit code 1 (EPERM): yarn install --non-interactive --prefer-offline --network-timeout 600000 --registry=https://registry.yarnpkg.com 14:56:28 PM: YARN install --non-interactive --prefer-offline --network-timeout 600000 attempt 1 of 3... 14:56:30 PM: Unknown Syntax Error: Invalid option name ("--network-timeout 600000"). $ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--mode #0] 14:56:30 PM: YARN install --non-interactive --prefer-offline --network-timeout 600000 --registry=https://registry.yarnpkg.com failure - Command failed with exit code 1 (EPERM): yarn install --non-interactive --prefer-offline --network-timeout 600000 --registry=https://registry.yarnpkg.com 14:56:31 PM: YARN install --non-interactive --prefer-offline --network-timeout 600000 --registry=https://registry.yarnpkg.com attempt 2 of 3... 14:56:33 PM: Unknown Syntax Error: Invalid option name ("--network-timeout 600000"). $ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--mode #0] 14:56:33 PM: YARN install --non-interactive --prefer-offline --network-timeout 600000 --registry=https://registry.yarnpkg.com failure - Command failed with exit code 1 (EPERM): yarn install --non-interactive --prefer-offline --network-timeout 600000 --registry=https://registry.yarnpkg.com 14:56:34 PM: YARN install --non-interactive --prefer-offline --network-timeout 600000 --registry=https://registry.yarnpkg.com attempt 3 of 3... 14:56:36 PM: Unknown Syntax Error: Invalid option name ("--network-timeout 600000"). $ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--mode #0] 14:56:36 PM: YARN install --non-interactive --prefer-offline --network-timeout 600000 --registry=https://registry.yarnpkg.com failure - Command failed with exit code 1 (EPERM): yarn install --non-interactive --prefer-offline --network-timeout 600000 --registry=https://registry.yarnpkg.com 14:56:36 PM: ERROR Failed to compile: Error: Command failed with exit code 1 (EPERM): yarn install --non-interactive --prefer-offline --network-timeout 600000 --registry=https://registry.yarnpkg.com
Vagr9K commented 3 years ago

Gatsby Cloud fails due to it passing unsupported parameters to Yarn 3. It looks like they only support Yarn Classic. You can try npm for Gatsby Cloud since it's also supported by the starter. Just make sure to update your package-lock.json with an npm i before deploying.

As for Netlify, it fails due to build issue. In particular some plugin/code calls window which causes the Gatsby build to fail. It seems to be connected to NetlifyCMS but I'm not sure.

It's possible that netlifycms introduced some sort of a regression.

Do local builds work?

vasfvitor commented 3 years ago

Just tested building locally and it worked. Not sure it's relevant but I have Yarn 3.0.0 and Node v16.9.1.

I didn't tried again in Gatsby Cloud.

Ok, I tried again (the same fork) in Netlify and it worked. I don't understand what happened in Netlify (I'm thinking it's probably my fault, it always is the operator fault).

Thank you for your help.

vasfvitor commented 2 years ago

For future reference: I didn't find exactly what the problem was in Netlify. I believe it's related to cache, it worked after I deleted the site (inside Netlify) and reconnected the forked repo again. And in Gatsby Cloud it worked after I set the yarn version to classic yarn set version classic You were right, they don't support Yarn 3 yet. But I'm not sure about the consequences or if anything is broken.

Just make sure to update your package-lock.json with an npm i before deploying.

As about this, I don't know how to implement it, after some research I found how to set the yarn version so I did it. But I'd prefer to not use yarn classic because I don't know if it can cause problem. Can you please comment how to do it (the npm i in package-lock)?

Vagr9K commented 2 years ago

But I'm not sure about the consequences or if anything is broken. It shouldn't be.

All 3 package managers can be used (npm, Yarn classic, Yarn v3). Just make sure to stick with one so you don't end up with multiple lockfiles.

Just make sure to update your package-lock.json with an npm i before deploying. This is only if you've used yarn for adding/removing/updating packages and are instead using npm now.

Just run npm i so it will update the npm lockfile in accordance with package.json.

Basically just stick with one package manager and you will be fine.