Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gatsby Starter Blog v2 Netlify deploy does not work #6844

Closed
naheller opened this issue Jul 28, 2018 · 19 comments
Closed

Gatsby Starter Blog v2 Netlify deploy does not work #6844

naheller opened this issue Jul 28, 2018 · 19 comments
Assignees
Labels
help wanted Issue with a clear description that the community can help with. status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. type: maintenance An issue or pull request describing a change that isn't a bug, feature or documentation change

Comments

@naheller
Copy link

Description

I am unable to deploy Gatsby Starter Blog v2 on Netlify. I have made no changes to the current code. Please see errors below.

Steps to reproduce

Clone down https://github.com/gatsbyjs/gatsby-starter-blog#v2
Initialize git repo with this code
Attempt to deploy via Netlify

Expected result

Site deploys via Netlify

Actual result

Many build errors, primarily around resolving modules. The phrase all errors have in common is Field 'browser' doesn't contain a valid alias configuration. The topmost error is as follows:

4:06:07 PM:   Error: ./.cache/page-renderer.js
4:06:07 PM:   Module not found: Error: Can't resolve '@babel/runtime/helpers/inheritsLoose'   in '/opt/build/repo/.cache'
4:06:07 PM:   resolve '@babel/runtime/helpers/inheritsLoose' in '/opt/build/repo/.cache'
4:06:07 PM:     Parsed request is a module
4:06:07 PM:     using description file: /opt/build/repo/package.json (relative path: ./.cach  e)
4:06:07 PM:       Field 'browser' doesn't contain a valid alias configuration
4:06:07 PM:       resolve as module
4:06:07 PM:         looking for modules in /opt/build/repo/src/node_modules
4:06:07 PM:           using description file: /opt/build/repo/package.json (relative path: .  /src/node_modules)
4:06:07 PM:             Field 'browser' doesn't contain a valid alias configuration
4:06:07 PM:             using description file: /opt/build/repo/package.json (relative path:   ./src/node_modules/@babel/runtime/helpers/inheritsLoose)
4:06:07 PM:               no extension
4:06:07 PM:                 Field 'browser' doesn't contain a valid alias configuration
4:06:07 PM:                 /opt/build/repo/src/node_modules/@babel/runtime/helpers/inherits  Loose doesn't exist
4:06:07 PM:               .js
4:06:07 PM:                 Field 'browser' doesn't contain a valid alias configuration
4:06:07 PM:                 /opt/build/repo/src/node_modules/@babel/runtime/helpers/inherits  Loose.js doesn't exist
4:06:07 PM:               .jsx
4:06:07 PM:                 Field 'browser' doesn't contain a valid alias configuration
4:06:07 PM:                 /opt/build/repo/src/node_modules/@babel/runtime/helpers/inherits  Loose.jsx doesn't exist
4:06:07 PM:               as directory
4:06:07 PM:                 /opt/build/repo/src/node_modules/@babel/runtime/helpers/inherits  Loose doesn't exist
4:06:07 PM:         /opt/build/repo/.cache/node_modules doesn't exist or is not a directory
4:06:07 PM:         /opt/build/node_modules doesn't exist or is not a directory
4:06:07 PM:         /opt/node_modules doesn't exist or is not a directory
4:06:07 PM:         /node_modules doesn't exist or is not a directory
4:06:07 PM:         looking for modules in /opt/build/repo/node_modules
4:06:07 PM:           using description file: /opt/build/repo/package.json (relative path: .  /node_modules)
4:06:07 PM:             Field 'browser' doesn't contain a valid alias configuration
4:06:07 PM:             using description file: /opt/build/repo/package.json (relative path:   ./node_modules/@babel/runtime/helpers/inheritsLoose)
4:06:07 PM:               no extension
4:06:07 PM:                 Field 'browser' doesn't contain a valid alias configuration
4:06:07 PM:                 /opt/build/repo/node_modules/@babel/runtime/helpers/inheritsLoos  e doesn't exist
4:06:07 PM:               .js
4:06:07 PM:                 Field 'browser' doesn't contain a valid alias configuration
4:06:07 PM:                 /opt/build/repo/node_modules/@babel/runtime/helpers/inheritsLoos  e.js doesn't exist
4:06:07 PM:               .jsx
4:06:07 PM:                 Field 'browser' doesn't contain a valid alias configuration
4:06:07 PM:                 /opt/build/repo/node_modules/@babel/runtime/helpers/inheritsLoos  e.jsx doesn't exist
4:06:07 PM:               as directory
4:06:07 PM:                 /opt/build/repo/node_modules/@babel/runtime/helpers/inheritsLoos  e doesn't exist
4:06:07 PM:   [/opt/build/repo/src/node_modules/@babel/runtime/helpers/inheritsLoose]
4:06:07 PM:   [/opt/build/repo/src/node_modules/@babel/runtime/helpers/inheritsLoose.js]
4:06:08 PM:   [/opt/build/repo/src/node_modules/@babel/runtime/helpers/inheritsLoose.jsx]
4:06:08 PM:   [/opt/build/repo/.cache/node_modules]
4:06:08 PM:   [/opt/build/node_modules]
4:06:08 PM:   [/opt/node_modules]
4:06:08 PM:   [/node_modules]
4:06:08 PM:   [/opt/build/repo/node_modules/@babel/runtime/helpers/inheritsLoose]
4:06:08 PM:   [/opt/build/repo/node_modules/@babel/runtime/helpers/inheritsLoose.js]
4:06:08 PM:   [/opt/build/repo/node_modules/@babel/runtime/helpers/inheritsLoose.jsx]
4:06:08 PM:    @ ./.cache/page-renderer.js 2:0-66 16:2-16
4:06:08 PM:    @ ./.cache/production-app.js

I'm happy to share additional errors if that would help.

Environment

System:
    OS: macOS High Sierra 10.13
    CPU: x64 Intel(R) Core(TM) i5-6360U CPU @ 2.00GHz
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 9.4.0 - ~/.nvm/versions/node/v9.4.0/bin/node
    Yarn: 1.7.0 - ~/.yarn/bin/yarn
    npm: 5.6.0 - ~/.nvm/versions/node/v9.4.0/bin/npm
  Browsers:
    Chrome: 67.0.3396.99
    Safari: 11.0
  npmPackages:
    gatsby: next => 2.0.0-beta.61
    gatsby-plugin-feed: next => 2.0.0-beta.4
    gatsby-plugin-google-analytics: next => 2.0.0-beta.3
    gatsby-plugin-offline: next => 2.0.0-beta.5
    gatsby-plugin-react-helmet: next => 3.0.0-beta.4
    gatsby-plugin-sharp: next => 2.0.0-beta.7
    gatsby-plugin-typography: next => 2.2.0-beta.3
    gatsby-remark-copy-linked-files: next => 2.0.0-beta.3
    gatsby-remark-images: next => 2.0.1-beta.9
    gatsby-remark-prismjs: next => 3.0.0-beta.5
    gatsby-remark-responsive-iframe: next => 2.0.0-beta.3
    gatsby-remark-smartypants: next => 2.0.0-beta.3
    gatsby-source-filesystem: next => 2.0.1-beta.10
    gatsby-transformer-remark: next => 2.1.1-beta.5
    gatsby-transformer-sharp: next => 2.1.1-beta.6
  npmGlobalPackages:
    gatsby-cli: 1.1.44

File contents (if changed)

gatsby-config.js: N/A
package.json: N/A
gatsby-node.js: N/A
gatsby-browser.js: N/A
gatsby-ssr.js: N/A

@naheller naheller changed the title Gatsby v2 Netlify deploy does not work Gatsby Starter Blog v2 Netlify deploy does not work Jul 28, 2018
@naheller
Copy link
Author

I should also add that the build runs successfully on my machine.

@brotzky
Copy link
Contributor

brotzky commented Jul 29, 2018

4:06:07 PM:   Error: ./.cache/page-renderer.js
4:06:07 PM:   Module not found: Error: Can't resolve '@babel/runtime/helpers/inheritsLoose'   in '/opt/build/repo/.cache'
4:06:07 PM:   resolve '@babel/runtime/helpers/inheritsLoose' in '/opt/build/repo/.cache

Possibly a caching issue?

Try triggering a redeploy in Netlify but disable cache.

screen shot 2018-07-28 at 5 45 45 pm

@DevanB
Copy link

DevanB commented Jul 29, 2018

I, too, have been having issues deploying Gatsby v2 to Netlify. I've started with the default starter but edited it. Here is my deploy logs

Netlify Deploy Log

3:10:36 PM: Build ready to start
3:10:38 PM: Fetching cached dependencies
3:10:38 PM: Starting to download cache of 254.8KB
3:10:38 PM: Finished downloading cache in 127.614649ms
3:10:38 PM: Starting to extract cache
3:10:38 PM: Failed to fetch cache, continuing with build
3:10:38 PM: Starting to prepare the repo for build
3:10:38 PM: No cached dependencies found. Cloning fresh repo
3:10:38 PM: git clone git@github.com:mrsbeitel/parkshipper
3:10:39 PM: Preparing Git Reference refs/heads/master
3:10:40 PM: Starting build script
3:10:40 PM: Installing dependencies
3:10:41 PM: Downloading and installing node v8.11.3...
3:10:41 PM: Downloading https://nodejs.org/dist/v8.11.3/node-v8.11.3-linux-x64.tar.xz...
3:10:41 PM: #
3:10:41 PM: #                                                                         3.3%
3:10:41 PM: #
3:10:41 PM: ########################                                                 34.8%
3:10:42 PM: 
###############
3:10:42 PM: ######################################                     73.8%
3:10:42 PM: 
######################################################################## 100.0%
3:10:42 PM: Computing checksum with sha256sum
3:10:42 PM: Checksums matched!
3:10:44 PM: Now using node v8.11.3 (npm v5.6.0)
3:10:44 PM: Attempting ruby version 2.3.6, read from environment
3:10:45 PM: Using ruby version 2.3.6
3:10:46 PM: Using PHP version 5.6
3:10:46 PM: Started restoring cached node modules
3:10:46 PM: Finished restoring cached node modules
3:10:46 PM: Started restoring cached yarn cache
3:10:46 PM: Finished restoring cached yarn cache
3:10:46 PM: Installing yarn at version 1.3.2
3:10:46 PM: Installing Yarn!
3:10:46 PM: > Downloading tarball...
3:10:46 PM: [1/2]: https://yarnpkg.com/downloads/1.3.2/yarn-v1.3.2.tar.gz --> /tmp/yarn.tar.gz.zBQyhr6woR
3:10:46 PM:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
3:10:46 PM:                                  Dload  Upload   Total   Spent    Left  Speed
3:10:46 PM: 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
3:10:46 PM: 
100    91  100    91    0     0    805      0 --:--:-- --:--:-- --:--:--   812
3:10:46 PM: 
  0     0    0   608    0     0   2016      0 --:--:-- --:--:-- --:--:--  2016
3:10:46 PM: 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
3:10:47 PM: 1
3:10:47 PM: 00  865k  100  865k    0     0   886k      0 --:--:-- --:--:-- --:--:-- 1367k
3:10:47 PM: [2/2]: https://yarnpkg.com/downloads/1.3.2/yarn-v1.3.2.tar.gz.asc --> /tmp/yarn.tar.gz.zBQyhr6woR.asc
3:10:47 PM: 
100    95  100    95    0     0   1933      0 --:--:-- --:--:-- --:--:--  1933
3:10:47 PM: 
  0     0    0   612    0     0   4415      0 --:--:-- --:--:-- --:--:--  4415
3:10:47 PM: 
100  1027  100  1027    0     0   5946      0 --:--:-- --:--:-- --:--:--  5946
3:10:47 PM: > Verifying integrity...
3:10:47 PM: gpg: Signature made Thu 02 Nov 2017 04:44:10 PM UTC using RSA key ID FD2497F5
3:10:47 PM: gpg: Good signature from "Yarn Packaging <yarn@dan.cx>"
3:10:47 PM: gpg: WARNING: This key is not certified with a trusted signature!
3:10:47 PM: gpg:          There is no indication that the signature belongs to the owner.
3:10:47 PM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907  BBB7 1646 B01B 86E5 0310
3:10:47 PM:      Subkey fingerprint: 6A01 0C51 6600 6599 AA17  F081 46C2 130D FD24 97F5
3:10:47 PM: > GPG signature looks good
3:10:48 PM: > Extracting to ~/.yarn...
3:10:48 PM: > Adding to $PATH...
3:10:48 PM: > We've added the following to your /opt/buildhome/.profile
3:10:48 PM: > If this isn't the profile of your current shell then please add the following to your correct profile:
3:10:48 PM: export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
3:10:48 PM: 
3:10:48 PM: > Successfully installed Yarn 1.3.2! Please open another terminal where the `yarn` command will now be available.
3:10:48 PM: Installing NPM modules using Yarn version 1.3.2
3:10:49 PM: yarn install v1.3.2
3:10:49 PM: [1/4] Resolving packages...
3:10:51 PM: [2/4] Fetching packages...
3:11:08 PM: info fsevents@1.2.4: The platform "linux" is incompatible with this module.
3:11:08 PM: info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
3:11:09 PM: [3/4] Linking dependencies...
3:11:15 PM: [4/4] Building fresh packages...
3:11:32 PM: success Saved lockfile.
3:11:32 PM: Done in 43.44s.
3:11:32 PM: NPM modules installed using Yarn
3:11:33 PM: Started restoring cached go cache
3:11:33 PM: Finished restoring cached go cache
3:11:33 PM: unset GOOS;
3:11:33 PM: unset GOARCH;
3:11:33 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.10.linux.amd64';
3:11:33 PM: export PATH="/opt/buildhome/.gimme/versions/go1.10.linux.amd64/bin:${PATH}";
3:11:33 PM: go version >&2;
3:11:33 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.10.linux.amd64.env';
3:11:33 PM: go version go1.10 linux/amd64
3:11:33 PM: Installing missing commands
3:11:33 PM: Verify run directory
3:11:33 PM: Executing user command: gatsby build
3:11:35 PM: success open and validate gatsby-config — 0.009 s
3:11:35 PM: success load plugins — 0.233 s
3:11:36 PM: success onPreInit — 0.224 s
3:11:36 PM: success delete html and css files from previous builds — 0.008 s
3:11:36 PM: success initialize cache — 0.009 s
3:11:36 PM: success copy gatsby files — 0.022 s
3:11:36 PM: success onPreBootstrap — 0.001 s
3:11:36 PM: success source and transform nodes — 0.028 s
3:11:36 PM: success building schema — 0.103 s
3:11:36 PM: success createPages — 0.006 s
3:11:36 PM: success createPagesStatefully — 0.028 s
3:11:36 PM: success onPreExtractQueries — 0.001 s
3:11:36 PM: success update schema — 0.053 s
3:11:36 PM: success extract queries from components — 0.042 s
3:11:36 PM: success run graphql queries — 0.027 s — 7/7 274.19 queries/second
3:11:36 PM: success write out page data — 0.003 s
3:11:36 PM: success write out redirect data — 0.001 s
3:11:36 PM: success onPostBootstrap — 0.001 s
3:11:37 PM: info bootstrap finished - 3.322 s
3:12:00 PM: success Building production JavaScript and CSS bundles — 24.323 s
3:12:01 PM: (node:1622) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
3:12:02 PM: error Building static HTML for pages failed
3:12:03 PM: See our docs page on debugging HTML builds for help https://goo.gl/yL9lND
3:12:03 PM:    7 |  		// Check if module is in cache
3:12:03 PM:    8 |  		if(installedModules[moduleId]) {
3:12:03 PM: >  9 |  			return installedModules[moduleId].exports;
3:12:03 PM:      | ^
3:12:03 PM:   10 |  		}
3:12:03 PM:   11 |  		// Create a new module (and put it into the cache)
3:12:03 PM:   12 |  		var module = installedModules[moduleId] = {
3:12:03 PM: 
3:12:03 PM:   WebpackError: TypeError: Promise.map is not a function
3:12:03 PM:   
3:12:03 PM:   - bootstrap:9 Promise
3:12:03 PM:     lib/webpack/bootstrap:9:1
3:12:03 PM:   
3:12:03 PM:   - static-entry.js:6 initializePromise
3:12:04 PM:     lib/.cache/static-entry.js:6:14
3:12:04 PM:   
3:12:04 PM:   
3:12:04 PM:   - bootstrap:5 module.exports
3:12:04 PM:     lib/webpack/bootstrap:5:1
3:12:04 PM:   
3:12:04 PM:   - bootstrap:35 webpack.run
3:12:04 PM:     lib/webpack/bootstrap:35:1
3:12:04 PM:   
3:12:04 PM:   
3:12:04 PM:   
3:12:04 PM:   - bootstrap:13 AsyncSeriesHook.eval [as callAsync]
3:12:04 PM:     eval at create (lib/webpack/bootstrap:13:1
3:12:04 PM:   
3:12:04 PM:   - bootstrap:24 AsyncSeriesHook.lazyCompileHook [as _callAsync]
3:12:05 PM:     lib/webpack/bootstrap:24:1
3:12:05 PM:   
3:12:05 PM:   
3:12:05 PM:   
3:12:05 PM:   
3:12:05 PM:   
3:12:05 PM:   - bootstrap:13 _err0
3:12:05 PM:     eval at create (lib/webpack/bootstrap:13:1
3:12:05 PM:   
3:12:05 PM:   - gatsby-browser-entry.js:2 WebpackAssetsManifest.handleAfterEmit
3:12:05 PM:     lib/.cache/gatsby-browser-entry.js:2:1
3:12:05 PM:   
3:12:05 PM:   - bootstrap:13 AsyncSeriesHook.eval [as callAsync]
3:12:05 PM:     eval at create (lib/webpack/bootstrap:13:1
3:12:06 PM:   
3:12:06 PM: 
3:12:06 PM: Caching artifacts
3:12:06 PM: Started saving node modules
3:12:06 PM: Finished saving node modules
3:12:06 PM: Started saving yarn cache
3:12:06 PM: Finished saving yarn cache
3:12:07 PM: Started saving pip cache
3:12:07 PM: Finished saving pip cache
3:12:07 PM: Started saving emacs cask dependencies
3:12:07 PM: Finished saving emacs cask dependencies
3:12:07 PM: Started saving maven dependencies
3:12:07 PM: Finished saving maven dependencies
3:12:07 PM: Started saving boot dependencies
3:12:07 PM: Finished saving boot dependencies
3:12:08 PM: Started saving go dependencies
3:12:08 PM: Finished saving go dependencies
3:12:08 PM: Cached node version v8.11.3
3:12:08 PM: Error running command: Build script returned non-zero exit code: 1
3:12:08 PM: Failing build: Failed to build site
3:12:08 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
3:12:08 PM: Finished processing build request in 1m30.607343653s

@joshbuchea
Copy link
Contributor

+1 running into the same issues deploying Gatsby Starter Blog v2 to Netlify. Build also runs successfully on my local machine.

@DevanB
Copy link

DevanB commented Jul 30, 2018

@joshbuchea Have you tried the latest beta? Upgrading to the latest beta fixed my problems.

@joshbuchea
Copy link
Contributor

Was able to resolve just now by removing package-lock.json from the repo.

@Chuloo
Copy link
Contributor

Chuloo commented Jul 30, 2018

@naheller are you able to solve this by upgrading to the latest beta?

@Chuloo Chuloo added the status: needs more info Needs triaging and reproducible examples or more information to be resolved label Jul 30, 2018
@moonmeister
Copy link
Contributor

@joshbuchea @DevanB @Chuloo Can ya'll please post the output of gatsby info. My guess, without seeing this info, is that it's a Linux issue. I'm trying to get v2 rolling on Linux and my local builds are failing.

 System:
    OS: Linux 4.15 Ubuntu 16.04.5 LTS (Xenial Xerus)
    CPU: x64 Intel(R) Core(TM) i5-3317U CPU @ 1.70GHz
    Shell: 4.3.48 - /bin/bash
  Binaries:
    Node: 8.11.3 - /usr/local/bin/node
    Yarn: 1.9.2 - /usr/bin/yarn
    npm: 5.6.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 68.0.3440.75
  npmPackages:
    gatsby: next => 2.0.0-beta.61 
    gatsby-plugin-feed: next => 2.0.0-beta.4 
    gatsby-plugin-google-analytics: next => 2.0.0-beta.3 
    gatsby-plugin-offline: next => 2.0.0-beta.5 
    gatsby-plugin-react-helmet: next => 3.0.0-beta.4 
    gatsby-plugin-sharp: next => 2.0.0-beta.7 
    gatsby-plugin-typography: next => 2.2.0-beta.3 
    gatsby-remark-copy-linked-files: next => 2.0.0-beta.3 
    gatsby-remark-images: next => 2.0.1-beta.9 
    gatsby-remark-prismjs: next => 3.0.0-beta.5 
    gatsby-remark-responsive-iframe: next => 2.0.0-beta.3 
    gatsby-remark-smartypants: next => 2.0.0-beta.3 
    gatsby-source-filesystem: next => 2.0.1-beta.10 
    gatsby-transformer-remark: next => 2.1.1-beta.5 
    gatsby-transformer-sharp: next => 2.1.1-beta.6 
  npmGlobalPackages:
    gatsby-cli: 2.0.0-beta.7
    gatsby: 2.0.0-beta.61

@moonmeister
Copy link
Contributor

Update: running yarn install fixed this issue for me on Ubuntu.

@agarrharr
Copy link
Contributor

Here is the error that I get:

6:18:09 PM: Executing user command: npm run build
6:18:09 PM: > orbit.fm@1.0.0 build /opt/build/repo
6:18:09 PM: > gatsby build
6:18:09 PM: success open and validate gatsby-config — 0.024 s
6:18:09 PM: warning replaceRenderer API found in these plugins:
6:18:10 PM: warning gatsby-plugin-emotion, default-site-plugin
6:18:10 PM: warning This might be an error, see: https://www.gatsbyjs.org/docs/debugging-replace-renderer-api/
6:18:10 PM: warning Duplicate replaceRenderer found, skipping gatsby-ssr.js for plugin: gatsby-plugin-emotion
6:18:10 PM: success load plugins — 0.407 s
6:18:10 PM: success onPreInit — 0.852 s
6:18:10 PM: success delete html and css files from previous builds — 0.007 s
6:18:10 PM: success initialize cache — 0.009 s
6:18:10 PM: success copy gatsby files — 0.034 s
6:18:10 PM: success onPreBootstrap — 0.014 s
6:18:10 PM: Starting to fetch data from Contentful
6:18:10 PM: Fetching default locale
6:18:10 PM: default local is : en-US
6:18:10 PM: contentTypes fetched 5
6:18:10 PM: Updated entries  162
6:18:10 PM: Deleted entries  0
6:18:10 PM: Updated assets  22
6:18:10 PM: Deleted assets  0
6:18:10 PM: Fetch Contentful data: 779.056ms
6:18:10 PM: success source and transform nodes — 1.679 s
6:18:10 PM: success building schema — 0.685 s
6:18:10 PM: success createPages — 0.259 s
6:18:10 PM: success createPagesStatefully — 0.034 s
6:18:10 PM: success onPreExtractQueries — 0.009 s
6:18:10 PM: success update schema — 0.524 s
6:18:10 PM: success extract queries from components — 0.297 s
6:18:10 PM: success run graphql queries — 8.799 s — 136/136 15.46 queries/second
6:18:10 PM: success write out page data — 0.006 s
6:18:10 PM: success write out redirect data — 0.001 s
6:18:10 PM: success onPostBootstrap — 0.004 s
6:18:10 PM: info bootstrap finished - 16.44 s
6:18:33 PM: success Building production JavaScript and CSS bundles — 46.310 s
6:18:33 PM: (node:3501) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
6:18:37 PM: error Building static HTML for pages failed
6:18:37 PM: See our docs page on debugging HTML builds for help https://goo.gl/yL9lND
6:18:37 PM:   43 |  	__webpack_require__.r = function(exports) {
6:18:37 PM:   44 |  		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
6:18:37 PM: > 45 |  			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
6:18:37 PM:      | ^
6:18:37 PM:   46 |  		}
6:18:37 PM:   47 |  		Object.defineProperty(exports, '__esModule', { value: true });
6:18:37 PM:   48 |  	};
6:18:37 PM: 
6:18:38 PM:   WebpackError: /opt/build/repo/public/render-page.js:15102
6:18:38 PM:   
6:18:38 PM:   - bootstrap:45 createScript
6:18:38 PM:     lib/webpack/bootstrap:45:1
6:18:38 PM:   
6:18:38 PM:   
6:18:38 PM:   
6:18:38 PM:   - static-entry.js:9 Object.Module._extensions..js
6:18:38 PM:     lib/.cache/static-entry.js:9:7
6:18:38 PM:   
6:18:38 PM:   
6:18:38 PM:   
6:18:38 PM:   
6:18:38 PM:   - parse-path.js:2 Module.require
6:18:38 PM:     lib/.cache/parse-path.js:2:18
6:18:38 PM:   
6:18:38 PM:   - bootstrap:9 require
6:18:38 PM:     lib/webpack/bootstrap:9:1
6:18:38 PM:   
6:18:38 PM:   - bootstrap:21 e
6:18:38 PM:     lib/webpack/bootstrap:21:1
6:18:38 PM:   
6:18:38 PM:   
6:18:38 PM:   - gatsby-browser-entry.js:32 Promise._resolveFromExecutor
6:18:38 PM:     lib/.cache/gatsby-browser-entry.js:32:1
6:18:38 PM:   
6:18:38 PM:   - bootstrap:68 new Promise
6:18:38 PM:     lib/webpack/bootstrap:68:1
6:18:38 PM:   
6:18:38 PM:   
6:18:38 PM:   - bootstrap:5 tryCatcher
6:18:38 PM:     lib/webpack/bootstrap:5:1
6:18:38 PM:   
6:18:38 PM:   - bootstrap:50 MappingPromiseArray._promiseFulfilled
6:18:38 PM:     lib/webpack/bootstrap:50:1
6:18:38 PM:   
6:18:38 PM: 
6:18:38 PM: npm ERR! Linux 4.4.111+
6:18:38 PM: npm ERR! argv "/opt/buildhome/.nvm/versions/node/v6.14.4/bin/node" "/opt/buildhome/.nvm/versions/node/v6.14.4/bin/npm" "run" "build"
6:18:38 PM: npm ERR! node v6.14.4
6:18:38 PM: npm ERR! npm  v3.10.10
6:18:38 PM: npm ERR! code ELIFECYCLE
6:18:38 PM: npm ERR! orbit.fm@1.0.0 build: `gatsby build`
6:18:38 PM: npm ERR! Exit status 1
6:18:38 PM: npm ERR!
6:18:38 PM: npm ERR! Failed at the orbit.fm@1.0.0 build script 'gatsby build'.
6:18:38 PM: npm ERR! Make sure you have the latest version of node.js and npm installed.
6:18:38 PM: npm ERR! If you do, this is most likely a problem with the orbit.fm package,
6:18:38 PM: npm ERR! not with npm itself.
6:18:38 PM: npm ERR! Tell the author that this fails on your system:
6:18:38 PM: npm ERR!     gatsby build
6:18:38 PM: npm ERR! You can get information on how to open an issue for this project with:
6:18:38 PM: npm ERR!     npm bugs orbit.fm
6:18:38 PM: npm ERR! Or if that isn't available, you can get their info via:
6:18:38 PM: npm ERR!     npm owner ls orbit.fm
6:18:38 PM: npm ERR! There is likely additional logging output above.
6:18:38 PM: npm ERR! Please include the following file with any support request:
6:18:38 PM: npm ERR!     /opt/build/repo/npm-debug.log
6:18:38 PM: Caching artifacts
6:18:38 PM: Started saving node modules
6:18:38 PM: Finished saving node modules
6:18:38 PM: Started saving pip cache
6:18:38 PM: Finished saving pip cache
6:18:38 PM: Started saving emacs cask dependencies
6:18:39 PM: Finished saving emacs cask dependencies
6:18:39 PM: Started saving maven dependencies
6:18:39 PM: Finished saving maven dependencies
6:18:39 PM: Started saving boot dependencies
6:18:39 PM: Finished saving boot dependencies
6:18:39 PM: Started saving go dependencies
6:18:39 PM: Finished saving go dependencies
6:18:39 PM: Cached node version v6.14.4
6:18:39 PM: Cached ruby version 2.2.3
6:18:39 PM: Error running command: Build script returned non-zero exit code: 1
6:18:39 PM: Failing build: Failed to build site
6:18:39 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
6:18:39 PM: Finished processing build request in 4m34.946095592s

And here is the output from running gatsby info on Netlify:

6:25:08 PM: Executing user command: gatsby info
6:25:08 PM:   System:
6:25:08 PM:     OS: Linux 4.4 Ubuntu 14.04.5 LTS, Trusty Tahr
6:25:08 PM:     CPU: x64 Intel(R) Xeon(R) CPU @ 2.60GHz
6:25:08 PM:     Shell: 4.3.11 - /bin/bash
6:25:08 PM:   Binaries:
6:25:08 PM:     Node: 6.14.4 - ~/.nvm/versions/node/v6.14.4/bin/node
6:25:08 PM:     npm: 3.10.10 - ~/.nvm/versions/node/v6.14.4/bin/npm
6:25:08 PM:   npmPackages:
6:25:08 PM:     gatsby: next => 2.0.0-beta.111
6:25:08 PM:     gatsby-image: next => 2.0.0-beta.8
6:25:08 PM:     gatsby-plugin-emotion: next => 2.0.0-beta.3
6:25:08 PM:     gatsby-plugin-feed: next => 2.0.0-beta.4
6:25:08 PM:     gatsby-plugin-google-analytics: next => 2.0.0-beta.5
6:25:08 PM:     gatsby-plugin-netlify: next => 2.0.0-beta.6
6:25:08 PM:     gatsby-plugin-react-helmet: next => 3.0.0-beta.4
6:25:08 PM:     gatsby-plugin-sharp: next => 2.0.0-beta.9
6:25:08 PM:     gatsby-plugin-typography: next => 2.2.0-beta.3
6:25:08 PM:     gatsby-source-contentful: next => 2.0.1-beta.18
6:25:08 PM:     gatsby-source-filesystem: next => 2.0.1-beta.10
6:25:08 PM:     gatsby-transformer-json: next => 2.1.1-beta.5
6:25:08 PM:     gatsby-transformer-sharp: next => 2.1.1-beta.7

@Chuloo
Copy link
Contributor

Chuloo commented Aug 22, 2018

@agarrharr can you try yarn install rather than npm install like @moonmeister did?

@Chuloo
Copy link
Contributor

Chuloo commented Aug 22, 2018

Successfully deployed to netlify, included the package-lock.json file in .gitignore and subsequently removed yarn.lock from it. That way Netlify uses Yarn to install modules. Here's the reproduction https://github.com/Chuloo/gatsby-netlify-starter-blog
Site: https://gracious-stallman-a52f72.netlify.com/

@Chuloo Chuloo added type: bug An issue or pull request relating to a bug in Gatsby help wanted Issue with a clear description that the community can help with. and removed status: needs more info Needs triaging and reproducible examples or more information to be resolved labels Aug 22, 2018
@Chuloo Chuloo added type: maintenance An issue or pull request describing a change that isn't a bug, feature or documentation change and removed type: bug An issue or pull request relating to a bug in Gatsby labels Aug 22, 2018
@agarrharr
Copy link
Contributor

agarrharr commented Aug 22, 2018

@Chuloo This is the error I get on Netlify with yarn:

1:00:40 PM: Build ready to start
1:00:48 PM: build-image version: 7c49b266ed8abd833dee6036ec0a4b9ee887658a
1:00:48 PM: buildbot version: f58df58ab0bceffdcb8d1e60fec992495a2a6751
1:00:49 PM: Fetching cached dependencies
1:00:49 PM: Starting to download cache of 262.1MB
1:00:50 PM: Finished downloading cache in 1.686072726s
1:00:50 PM: Starting to extract cache
1:00:59 PM: Finished extracting cache in 8.366449647s
1:00:59 PM: Finished fetching cache in 10.153744107s
1:00:59 PM: Starting to prepare the repo for build
1:00:59 PM: Preparing Git Reference pull/101/head
1:01:00 PM: Starting build script
1:01:00 PM: Installing dependencies
1:01:01 PM: Started restoring cached node version
1:01:02 PM: Finished restoring cached node version
1:01:03 PM: v6.14.4 is already installed.
1:01:04 PM: Now using node v6.14.4 (npm v3.10.10)
1:01:04 PM: Attempting ruby version 2.2.3, read from environment
1:01:04 PM: Started restoring cached ruby version
1:01:04 PM: Finished restoring cached ruby version
1:01:05 PM: Using ruby version 2.2.3
1:01:12 PM: Successfully installed bundler-1.16.4
1:01:12 PM: Parsing documentation for bundler-1.16.4
1:01:12 PM: Installing ri documentation for bundler-1.16.4
1:01:12 PM: Done installing documentation for bundler after 5 seconds
1:01:12 PM: 1 gem installed
1:01:12 PM: Using PHP version 5.6
1:01:12 PM: Started restoring cached node modules
1:01:12 PM: Finished restoring cached node modules
1:01:12 PM: Started restoring cached yarn cache
1:01:15 PM: Finished restoring cached yarn cache
1:01:16 PM: Installing NPM modules using Yarn version 0.18.1
1:01:17 PM: yarn install v0.18.1
1:01:17 PM: [1/4] Resolving packages...
1:01:18 PM: [2/4] Fetching packages...
1:01:39 PM: error react-testing-library@4.1.9: The engine "node" is incompatible with this module. Expected version ">=8".
1:01:39 PM: error Found incompatible module
1:01:39 PM: info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
1:01:39 PM: Error during Yarn install
1:01:39 PM: Error running command: Build script returned non-zero exit code: 1
1:01:39 PM: Failing build: Failed to build site
1:01:39 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
1:01:39 PM: Finished processing build request in 50.698283662s

It looks like gatsby-image has react-testing-library as a dependency, and react-testing-library has engines set to:

"engines": {
  "node": ">=8",
  "npm": ">=5"
},

@agarrharr
Copy link
Contributor

Ok, I got it to work by using yarn.

  1. Remove package-lock.json
  2. Run yarn locally to create yarn.lock
  3. Set node version in Netlify (with a NODE_VERSION environment variable or in /.nvmrc)

@m-allanson
Copy link
Contributor

m-allanson commented Aug 29, 2018

It looks like this is caused by the package-lock.json file being out of date, and issues when switching between yarn and npm. The short term fix is to update the package-lock for these starters. Longer term maybe the gatsby cli should ask which package manager you want to use?

@KyleAMathews is updating the package-lock for these starters.

Edit: related issue #6834

@m-allanson
Copy link
Contributor

Implementing #1545 would mean that the package-lock file would be kept up to date automatically.

@pieh pieh added the status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. label Sep 7, 2018
@pieh
Copy link
Contributor

pieh commented Sep 10, 2018

This is fixed for now, so I'll close this issue

@pieh pieh closed this as completed Sep 10, 2018
@Steffi3rd
Copy link

I had the same problem, I just move out package-lock.json outside the project. Then it works.

I think netlify checks this file first instead package.json...

@jimt
Copy link
Contributor

jimt commented Dec 5, 2018

#6834 appears to be broken again (using yarn add instead of npm install --save works).

paxcodes pushed a commit to paxcodes/portfolio that referenced this issue Sep 4, 2019
Having issues with Netlify build
gatsbyjs/gatsby#6844 (comment)
paxcodes pushed a commit to paxcodes/portfolio that referenced this issue Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issue with a clear description that the community can help with. status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. type: maintenance An issue or pull request describing a change that isn't a bug, feature or documentation change
Projects
None yet
Development

No branches or pull requests