Closed anandrikka closed 6 years ago
If you go into the Netlify build log what's the error that's thrown?
You're using local .env file. Have you setup the same variables in Netlify?
One tip to make the code easier to read in github
You can add javascript after the first three ``` to let Github know to highlight the code as javascript
function() {
const text = 'hello world';
return text;
}
function() {
const text = 'hello world';
return text;
}
1:55:24 AM: Build ready to start
1:55:26 AM: Fetching cached dependencies
1:55:26 AM: Starting to download cache of 113.3MB
1:55:26 AM: Finished downloading cache in 620.994037ms
1:55:26 AM: Starting to extract cache
1:55:30 AM: Finished extracting cache in 3.938018026s
1:55:30 AM: Finished fetching cache in 4.634263201s
1:55:30 AM: Starting to prepare the repo for build
1:55:31 AM: Preparing Git Reference refs/heads/master
1:55:32 AM: Starting build script
1:55:32 AM: Installing dependencies
1:55:33 AM: Started restoring cached node version
1:55:35 AM: Finished restoring cached node version
1:55:35 AM: v8.11.3 is already installed.
1:55:36 AM: Now using node v8.11.3 (npm v5.6.0)
1:55:36 AM: Attempting ruby version 2.3.6, read from environment
1:55:37 AM: Using ruby version 2.3.6
1:55:37 AM: Using PHP version 5.6
1:55:37 AM: Started restoring cached node modules
1:55:37 AM: Finished restoring cached node modules
1:55:37 AM: Started restoring cached yarn cache
1:55:37 AM: Finished restoring cached yarn cache
1:55:38 AM: Installing NPM modules using Yarn version 1.3.2
1:55:39 AM: yarn install v1.3.2
1:55:39 AM: [1/4] Resolving packages...
1:55:46 AM: warning stylefmt > stylelint > doiuse > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
1:55:46 AM: warning stylefmt > stylelint > stylehacks > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
1:55:47 AM: [2/4] Fetching packages...
1:56:07 AM: info fsevents@1.2.4: The platform "linux" is incompatible with this module.
1:56:07 AM: info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
1:56:07 AM: [3/4] Linking dependencies...
1:56:07 AM: warning "gatsby > friendly-errors-webpack-plugin@1.7.0" has incorrect peer dependency "webpack@^2.0.0 || ^3.0.0 || ^4.0.0".
1:56:07 AM: warning "gatsby > postcss-cssnext@2.11.0" has unmet peer dependency "caniuse-db@^1.0.30000652".
1:56:07 AM: warning "gatsby-plugin-sass > sass-loader@4.1.1" has unmet peer dependency "webpack@^2 || ^2.2.0-rc.0 || ^2.1.0-beta || ^1.12.6".
1:56:07 AM: warning "gatsby-transformer-remark > graphql-type-json@0.1.4" has unmet peer dependency "graphql@>=0.4.0".
1:56:07 AM: warning " > lodash-webpack-plugin@0.11.5" has unmet peer dependency "webpack@^2.0.0 || ^3.0.0 || ^4.0.0".
1:56:16 AM: [4/4] Building fresh packages...
1:56:33 AM: success Saved lockfile.
1:56:33 AM: Done in 54.60s.
1:56:33 AM: NPM modules installed using Yarn
1:56:34 AM: Started restoring cached go cache
1:56:34 AM: Finished restoring cached go cache
1:56:34 AM: unset GOOS;
1:56:34 AM: unset GOARCH;
1:56:34 AM: export GOROOT='/opt/buildhome/.gimme/versions/go1.10.linux.amd64';
1:56:34 AM: export PATH="/opt/buildhome/.gimme/versions/go1.10.linux.amd64/bin:${PATH}";
1:56:34 AM: go version >&2;
1:56:34 AM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.10.linux.amd64.env';
1:56:34 AM: go version go1.10 linux/amd64
1:56:34 AM: Installing missing commands
1:56:34 AM: Verify run directory
1:56:34 AM: Executing user command: gatsby build
1:56:35 AM: success delete html and css files from previous builds — 0.012 s
1:56:35 AM: success open and validate gatsby-config — 0.009 s
1:56:35 AM: success copy gatsby files — 0.013 s
1:56:36 AM: success onPreBootstrap — 0.612 s
1:56:36 AM: success source and transform nodes — 0.213 s
1:56:36 AM: Initializing gatsby-remark-component
1:56:36 AM: success building schema — 0.264 s
1:56:36 AM: success createLayouts — 0.010 s
1:56:37 AM: Your site's "gatsby-node.js" created a page with a component that doesn't exist
1:56:37 AM: { path: 'posts/2018/06/14/sample-post/',
1:56:37 AM: component: '/opt/build/repo/src/templates/post.js',
1:56:37 AM: context: { slug: '2018/06/14/sample-post/' } }
1:56:37 AM: See the documentation for createPage https://www.gatsbyjs.org/docs/bound-action-creators/#createPage
1:56:37 AM: Caching artifacts
1:56:37 AM: Started saving node modules
1:56:37 AM: Finished saving node modules
1:56:37 AM: Started saving yarn cache
1:56:37 AM: Finished saving yarn cache
1:56:37 AM: Started saving pip cache
1:56:37 AM: Finished saving pip cache
1:56:37 AM: Started saving emacs cask dependencies
1:56:37 AM: Finished saving emacs cask dependencies
1:56:37 AM: Started saving maven dependencies
1:56:37 AM: Finished saving maven dependencies
1:56:37 AM: Started saving boot dependencies
1:56:37 AM: Finished saving boot dependencies
1:56:37 AM: Started saving go dependencies
1:56:37 AM: Finished saving go dependencies
1:56:37 AM: Error running command: Build script returned non-zero exit code: 1
1:56:37 AM: Failing build: Failed to build site
1:56:37 AM: failed during stage 'building site': Build script returned non-zero exit code: 1
1:56:37 AM: Finished processing build request in 1m11.703355172s
@anandrikka do you have a repo I could check out?
I've seen that error when there are some weird casing issues between my local machine and Netlify (which runs on some flavor of Linux).
Right, perfect! So that's exactly the issue.
Check this out, which is lowercase -> https://github.com/anandrikka/blog.anandrikka.com/blob/master/gatsby-node.js#L119
Then we have the actual file name, which is uppercase. Therein lies your issue :)
So you could either:
Fix gatsby-node.js
to refer to the uppercase variants
or
Fix the src/templates
directory to be re-named to uppercase files.
@DSchau Nice catch.... Interesting my local is showing all names as defined in file. I do remember checking in code for the same, but for some reason it looks like changes didn't apply. Once again thank you very much saved my day !
Great! Glad to hear it :)
Hi, I'm experiencing the same error on netlify, but I don't understand that uppercase fix...
This is my github repo https://github.com/Zurc/gatsby_static_website
And this is my netlify deploy log
Any help is really appreciated
12:41:31 AM: Build ready to start
12:41:33 AM: build-image version: 42bca793ccd33055023c56c4ca8510463a56d317
12:41:33 AM: buildbot version: 6bab8b64bbd90091082af19fedf16bf73d502e5e
12:41:33 AM: Fetching cached dependencies
12:41:33 AM: Starting to download cache of 254.7KB
12:41:33 AM: Finished downloading cache in 109.918431ms
12:41:33 AM: Starting to extract cache
12:41:33 AM: Failed to fetch cache, continuing with build
12:41:33 AM: Starting to prepare the repo for build
12:41:34 AM: No cached dependencies found. Cloning fresh repo
12:41:34 AM: git clone https://github.com/Zurc/gatsby_static_website
12:41:34 AM: Preparing Git Reference refs/heads/master
12:41:35 AM: Starting build script
12:41:35 AM: Installing dependencies
12:41:36 AM: Downloading and installing node v8.12.0...
12:41:36 AM: Downloading https://nodejs.org/dist/v8.12.0/node-v8.12.0-linux-x64.tar.xz...
12:41:36 AM: 0.
12:41:36 AM: 9%
12:41:36 AM:
#######################################
12:41:36 AM: ###### 63.6%
12:41:36 AM:
###########################################
12:41:36 AM: ############################# 100.0%
12:41:36 AM: Computing checksum with sha256sum
12:41:36 AM: Checksums matched!
12:41:38 AM: Now using node v8.12.0 (npm v6.4.1)
12:41:39 AM: Attempting ruby version 2.3.6, read from environment
12:41:40 AM: Using ruby version 2.3.6
12:41:40 AM: Using PHP version 5.6
12:41:40 AM: Started restoring cached node modules
12:41:40 AM: Finished restoring cached node modules
12:41:40 AM: Installing NPM modules using NPM version 6.4.1
12:42:26 AM: > sharp@0.20.8 install /opt/build/repo/node_modules/sharp
12:42:26 AM: > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
12:42:26 AM: info sharp Detected globally-installed libvips v8.6.2
12:42:26 AM: info sharp Building from source via node-gyp
12:42:28 AM: make: Entering directory `/opt/build/repo/node_modules/sharp/build'
12:42:28 AM: TOUCH Release/obj.target/libvips-cpp.stamp
12:42:28 AM: CXX(target) Release/obj.target/sharp/src/common.o
12:42:30 AM: CXX(target) Release/obj.target/sharp/src/metadata.o
12:42:31 AM: CXX(target) Release/obj.target/sharp/src/stats.o
12:42:32 AM: CXX(target) Release/obj.target/sharp/src/operations.o
12:42:34 AM: CXX(target) Release/obj.target/sharp/src/pipeline.o
12:42:38 AM: CXX(target) Release/obj.target/sharp/src/sharp.o
12:42:39 AM: CXX(target) Release/obj.target/sharp/src/utilities.o
12:42:40 AM: SOLINK_MODULE(target) Release/obj.target/sharp.node
12:42:40 AM: COPY Release/sharp.node
12:42:40 AM: make: Leaving directory `/opt/build/repo/node_modules/sharp/build'
12:42:44 AM: npm notice
12:42:44 AM: created a lockfile as package-lock.json. You should commit this file.
12:42:44 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
12:42:44 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
12:42:44 AM: added 1701 packages from 1039 contributors and audited 19427 packages in 63.209s
12:42:44 AM: found 0 vulnerabilities
12:42:44 AM: NPM modules installed
12:42:44 AM: Started restoring cached go cache
12:42:44 AM: Finished restoring cached go cache
12:42:44 AM: unset GOOS;
12:42:44 AM: unset GOARCH;
12:42:44 AM: export GOROOT='/opt/buildhome/.gimme/versions/go1.10.linux.amd64';
12:42:44 AM: export PATH="/opt/buildhome/.gimme/versions/go1.10.linux.amd64/bin:${PATH}";
12:42:44 AM: go version >&2;
12:42:45 AM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.10.linux.amd64.env';
12:42:45 AM: go version go1.10 linux/amd64
12:42:45 AM: Installing missing commands
12:42:45 AM: Verify run directory
12:42:45 AM: Executing user command: gatsby build
12:42:47 AM: success open and validate gatsby-config — 0.011 s
12:42:47 AM: success load plugins — 0.174 s
12:42:47 AM: success onPreInit — 0.415 s
12:42:47 AM: success delete html and css files from previous builds — 0.007 s
12:42:47 AM: success initialize cache — 0.010 s
12:42:47 AM: success copy gatsby files — 0.055 s
12:42:47 AM: success onPreBootstrap — 0.007 s
12:42:47 AM: error
12:42:47 AM: The path passed to gatsby-source-filesystem does not exist on your file system:
12:42:47 AM: ${__dirname}/src/pages
12:42:47 AM: Please pick a path to an existing directory.
12:42:47 AM: See docs here - https://www.gatsbyjs.org/packages/gatsby-source-filesystem/
12:42:47 AM: Caching artifacts
12:42:47 AM: Started saving node modules
12:42:47 AM: Finished saving node modules
12:42:47 AM: Started saving pip cache
12:42:47 AM: Finished saving pip cache
12:42:47 AM: Started saving emacs cask dependencies
12:42:47 AM: Finished saving emacs cask dependencies
12:42:47 AM: Started saving maven dependencies
12:42:47 AM: Finished saving maven dependencies
12:42:48 AM: Started saving boot dependencies
12:42:48 AM: Finished saving boot dependencies
12:42:48 AM: Started saving go dependencies
12:42:48 AM: Finished saving go dependencies
12:42:48 AM: Cached node version v8.12.0
12:42:48 AM: Error running command: Build script returned non-zero exit code: 1
12:42:48 AM: Failing build: Failed to build site
12:42:48 AM: failed during stage 'building site': Build script returned non-zero exit code: 1
12:42:48 AM: Finished processing build request in 1m14.970966038s
I've found the issue!
on gatsby-node.js the path to resolve my templates started with '/'. removed that and it works
const postTemplate = path.resolve('src/templates/blog.post.js');
Thank you @Zurc. That was holding my deploy up as well. It looks like it's building the files just fine in development and on a gatsby build locally, but removing that leading '/' cleared it all up.
I am having the same issue with the but using create-react-app with the non-zero exit code: 1. I am not sure what to try. Builds on my local machine. Flushed the cache and rebuilt several times. Uploaded a create-react-app template and site build fine. Any pointers
4:10:54 PM: Build ready to start
4:10:56 PM: build-image version: 324ec043422499a87b63cac1f1dabeefe6dca19d
4:10:56 PM: build-image tag: v3.0.2
4:10:56 PM: buildbot version: ef2e26260c41679f4cdeaebbf93370345c9fecf7
4:10:56 PM: Fetching cached dependencies
4:10:56 PM: Starting to download cache of 254.9KB
4:10:56 PM: Finished downloading cache in 87.249267ms
4:10:56 PM: Starting to extract cache
4:10:56 PM: Failed to fetch cache, continuing with build
4:10:56 PM: Starting to prepare the repo for build
4:10:56 PM: No cached dependencies found. Cloning fresh repo
4:10:56 PM: git clone https://github.com/jimbits/naitcoop
4:10:57 PM: Preparing Git Reference refs/heads/master
4:10:57 PM: Starting build script
4:10:57 PM: Installing dependencies
4:10:59 PM: v10.15.3 is already installed.
4:10:59 PM: Now using node v10.15.3 (npm v6.4.1)
4:11:00 PM: Attempting ruby version 2.6.2, read from environment
4:11:01 PM: Using ruby version 2.6.2
4:11:02 PM: Using PHP version 5.6
4:11:02 PM: Started restoring cached node modules
4:11:02 PM: Finished restoring cached node modules
4:11:02 PM: Started restoring cached yarn cache
4:11:02 PM: Finished restoring cached yarn cache
4:11:02 PM: Installing yarn at version 1.13.0
4:11:02 PM: Installing Yarn!
4:11:02 PM: > Downloading tarball...
4:11:02 PM: [1/2]: https://yarnpkg.com/downloads/1.13.0/yarn-v1.13.0.tar.gz --> /tmp/ya
4:11:02 PM: rn.tar.gz.rjOjV9mT5a
4:11:02 PM: % Total % Received % Xferd Average Speed Time Time Time Current
4:11:02 PM: Dload Upload Total Spent Left Speed
4:11:02 PM:
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
4:11:02 PM:
0 0 0 0 0 0 0 0 --:--
4:11:02 PM: :-- --:--:-- --:--:-- 0
4:11:02 PM:
100 93 100 93 0 0
4:11:02 PM: 356 0 --:--:-- --:--:-- --:--:-- 354
4:11:02 PM:
100 609 0 609 0 0 1031 0 --:--:-- --:--:-- --
4:11:02 PM: :--:-- 1031
4:11:03 PM:
100 1142k 100 1142k 0 0 1121k 0 0:00:01 0:00:01 --:--:-- 1121k
4:11:03 PM: [2/2]: https://yarnpkg.com/downloads/1.1
4:11:03 PM: 3.0/yarn-v1.13.0.tar.gz.asc --> /tmp/yarn.tar.gz.rjOjV9mT5a.asc
4:11:03 PM:
100 97 100 97
4:11:03 PM: 0 0 2550 0 --:--:-- --:--:-- --:--:-- 2550
100 97 100 97 0 0 2545 0 --:--:-- --:--:-- --:--:-
4:11:03 PM: - 0
4:11:03 PM:
100 613 0 613 0 0 4925 0 --:--:-- --:--:-
4:11:03 PM: - --:--:-- 4925
4:11:03 PM:
100 832 100 832 0 0 5189 0 --:--:-- --:--:-- --:--:-- 5189
4:11:03 PM: > Verifying integrity...
4:11:03 PM: gpg: Signature made Tue 18 Dec 2018 04:04:55 PM UTC using RSA key ID B6FF4DE3
4:11:03 PM: gpg: Good signature from "Yarn Packaging <yarn@dan.cx>"
4:11:03 PM: gpg: Note: This key has expired!
4:11:03 PM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907 BBB7 1646 B01B 86E5 0310
4:11:03 PM: Subkey fingerprint: E219 30C4 D0A4 AA46 1858 1F7A E074 D16E B6FF 4DE3
4:11:03 PM: > GPG signature looks good
4:11:03 PM: > Extracting to ~/.yarn...
4:11:03 PM: > Adding to $PATH...
4:11:03 PM: > We've added the following to your /opt/buildhome/.profile
4:11:03 PM: > If this isn't the profile of your current shell then please add the following to your correct profile:
4:11:03 PM: export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
4:11:03 PM:
4:11:03 PM: > Successfully installed Yarn 1.13.0! Please open another terminal where the `yarn` command will now be available.
4:11:04 PM: Installing NPM modules using Yarn version 1.13.0
4:11:05 PM: yarn install v1.13.0
4:11:05 PM: [1/4] Resolving packages...
4:11:08 PM: [2/4] Fetching packages...
4:11:28 PM: info fsevents@1.2.4: The platform "linux" is incompatible with this module.
4:11:28 PM: info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
4:11:28 PM: [3/4] Linking dependencies...
4:11:28 PM: warning "firebase > @firebase/functions@0.4.3" has unmet peer dependency "@firebase/app-types@0.x".
4:11:28 PM: warning "firebase > @firebase/database@0.3.16" has unmet peer dependency "@firebase/app-types@0.x".
4:11:28 PM: warning "firebase > @firebase/messaging@0.3.15" has unmet peer dependency "@firebase/app-types@0.x".
4:11:28 PM: warning "firebase > @firebase/firestore@1.1.2" has unmet peer dependency "@firebase/app-types@0.x".
4:11:28 PM: warning "firebase > @firebase/storage@0.2.12" has unmet peer dependency "@firebase/app-types@0.x".
4:11:28 PM: warning "firebase > @firebase/functions > @firebase/messaging-types@0.2.8" has unmet peer dependency "@firebase/app-types@0.x".
4:11:28 PM: warning "firebase > @firebase/auth > @firebase/auth-types@0.5.5" has unmet peer dependency "@firebase/app-types@0.x".
4:11:28 PM: warning "firebase > @firebase/auth > @firebase/auth-types@0.5.5" has unmet peer dependency "@firebase/util@0.x".
4:11:28 PM: warning "firebase > @firebase/firestore > @firebase/firestore-types@1.1.1" has unmet peer dependency "@firebase/app-types@0.x".
4:11:28 PM: warning "firebase > @firebase/storage > @firebase/storage-types@0.2.8" has unmet peer dependency "@firebase/app-types@0.x".
4:11:28 PM: warning "firebase > @firebase/storage > @firebase/storage-types@0.2.8" has unmet peer dependency "@firebase/util@0.x".
4:11:28 PM: warning "firebase > @firebase/database > @firebase/database-types@0.3.8" has unmet peer dependency "@firebase/app-types@0.x".
4:11:28 PM: warning "react-scripts > pnp-webpack-plugin > ts-pnp@1.0.0" has unmet peer dependency "typescript@*".
4:11:38 PM: [4/4] Building fresh packages...
4:11:39 PM: success Saved lockfile.
4:11:39 PM: Done in 34.54s.
4:11:39 PM: NPM modules installed using Yarn
4:11:40 PM: Started restoring cached go cache
4:11:40 PM: Finished restoring cached go cache
4:11:40 PM: unset GOOS;
4:11:40 PM: unset GOARCH;
4:11:40 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
4:11:40 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
4:11:40 PM: go version >&2;
4:11:40 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
4:11:40 PM: go version go1.12 linux/amd64
4:11:40 PM: Installing missing commands
4:11:40 PM: Verify run directory
4:11:40 PM: Executing user command: yarn build
4:11:40 PM: yarn run v1.13.0
4:11:40 PM: $ react-scripts build
4:11:42 PM: Creating an optimized production build...
4:11:46 PM: Failed to compile.
4:11:46 PM: ./src/pages/index/LoginPage.jsx
4:11:46 PM: Cannot find module: 'components/logo'. Make sure this package is installed.
4:11:46 PM: You can install this package by running: yarn add components/logo.
4:11:46 PM: error Command failed with exit code 1.
4:11:46 PM: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
4:11:46 PM: Caching artifacts
4:11:46 PM: Started saving node modules
4:11:46 PM: Finished saving node modules
4:11:46 PM: Started saving yarn cache
4:11:46 PM: Finished saving yarn cache
4:11:46 PM: Started saving pip cache
4:11:46 PM: Finished saving pip cache
4:11:46 PM: Started saving emacs cask dependencies
4:11:46 PM: Finished saving emacs cask dependencies
4:11:46 PM: Started saving maven dependencies
4:11:46 PM: Finished saving maven dependencies
4:11:46 PM: Started saving boot dependencies
4:11:46 PM: Finished saving boot dependencies
4:11:46 PM: Started saving go dependencies
4:11:46 PM: Finished saving go dependencies
4:11:48 PM: Cached node version v10.15.3
4:11:48 PM: Error running command: Build script returned non-zero exit code: 1
4:11:48 PM: Failing build: Failed to build site
4:11:48 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
4:11:48 PM: Finished processing build request in 52.562045956s
@jimbits there is a chance that it can't find file components/logo
because it has uppercase first letter i.e components/Logo
in your file system. And if you work on Mac - it won't be a problem, this is why it builds locally, but on linux it will fail
Still have this issue
9:08:05 PM: Build ready to start 9:08:09 PM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63 9:08:09 PM: build-image tag: v3.3.2 9:08:09 PM: buildbot version: a2bab682ae0761baa4d123ebd00c57be933655dc 9:08:09 PM: Fetching cached dependencies 9:08:10 PM: Failed to fetch cache, continuing with build 9:08:10 PM: Starting to prepare the repo for build 9:08:10 PM: No cached dependencies found. Cloning fresh repo 9:08:10 PM: git clone https://github.com/OliverHuntsman/gatsby-starter-blog 9:08:10 PM: Preparing Git Reference refs/heads/master 9:08:11 PM: Starting build script 9:08:11 PM: Installing dependencies 9:08:12 PM: Downloading and installing node v10.17.0... 9:08:13 PM: Downloading https://nodejs.org/dist/v10.17.0/node-v10.17.0-linux-x64.tar.xz... 9:08:13 PM: ####################################### 9:08:13 PM: ########## 69.2% 9:08:13 PM: ####################################### 9:08:13 PM: ################################# 100.0% 9:08:13 PM: Computing checksum with sha256sum 9:08:13 PM: Checksums matched! 9:08:15 PM: Now using node v10.17.0 (npm v6.11.3) 9:08:16 PM: Attempting ruby version 2.6.2, read from environment 9:08:17 PM: Using ruby version 2.6.2 9:08:17 PM: Using PHP version 5.6 9:08:17 PM: Started restoring cached node modules 9:08:17 PM: Finished restoring cached node modules 9:08:17 PM: Installing NPM modules using NPM version 6.11.3 9:08:53 PM: > sharp@0.23.2 install /opt/build/repo/node_modules/sharp 9:08:53 PM: > (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy) 9:08:53 PM: info 9:08:53 PM: sharp 9:08:53 PM: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.8.1/libvips-8.8.1-linux-x64.tar.gz 9:08:56 PM: > core-js@2.6.10 postinstall /opt/build/repo/node_modules/core-js 9:08:56 PM: > node postinstall || echo "ignore" 9:08:56 PM: Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library! 9:08:56 PM: The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 9:08:56 PM: > https://opencollective.com/core-js 9:08:56 PM: > https://www.patreon.com/zloirock 9:08:56 PM: Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -) 9:08:56 PM: > gatsby-telemetry@1.1.36 postinstall /opt/build/repo/node_modules/gatsby-telemetry 9:08:56 PM: > node src/postinstall.js 9:08:56 PM: > cwebp-bin@5.1.0 postinstall /opt/build/repo/node_modules/cwebp-bin 9:08:56 PM: > node lib/install.js 9:08:57 PM: ✔ cwebp pre-build test passed successfully 9:08:57 PM: > mozjpeg@6.0.1 postinstall /opt/build/repo/node_modules/mozjpeg 9:08:57 PM: > node lib/install.js 9:08:57 PM: ✔ mozjpeg pre-build test passed successfully 9:08:57 PM: > pngquant-bin@5.0.2 postinstall /opt/build/repo/node_modules/pngquant-bin 9:08:57 PM: > node lib/install.js 9:08:57 PM: ✔ pngquant pre-build test passed successfully 9:08:57 PM: > gatsby-cli@2.8.9 postinstall /opt/build/repo/node_modules/gatsby/node_modules/gatsby-cli 9:08:57 PM: > node scripts/postinstall.js 9:08:57 PM: > gatsby@2.17.11 postinstall /opt/build/repo/node_modules/gatsby 9:08:57 PM: > node scripts/postinstall.js 9:09:01 PM: npm 9:09:01 PM: WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents): 9:09:01 PM: npm WARN 9:09:01 PM: notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) 9:09:01 PM: npm WARN optional 9:09:01 PM: SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/chokidar/node_modules/fsevents): 9:09:01 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) 9:09:01 PM: added 2334 packages from 1095 contributors and audited 30950 packages in 42.481s 9:09:01 PM: found 0 vulnerabilities 9:09:01 PM: NPM modules installed 9:09:01 PM: Started restoring cached go cache 9:09:01 PM: Finished restoring cached go cache 9:09:01 PM: unset GOOS; 9:09:01 PM: unset GOARCH; 9:09:01 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64'; 9:09:01 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}"; 9:09:01 PM: go version >&2; 9:09:01 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env'; 9:09:01 PM: go version go1.12 linux/amd64 9:09:01 PM: Installing missing commands 9:09:01 PM: Verify run directory 9:09:01 PM: Executing user command: gatsby build 9:09:03 PM: error Couldn't find the "gatsby-plugin-netlify" plugin declared in "/opt/build/repo/gatsby-config.js". 9:09:03 PM: Tried looking for a local plugin in /opt/build/repo/plugins/gatsby-plugin-netlify. 9:09:03 PM: Tried looking for an installed package in the following paths: 9:09:03 PM: - /opt/build/repo/node_modules/gatsby/dist/bootstrap/load-themes/node_modules/gatsby-plugin-netlify 9:09:03 PM: - /opt/build/repo/node_modules/gatsby/dist/bootstrap/node_modules/gatsby-plugin-netlify 9:09:03 PM: - /opt/build/repo/node_modules/gatsby/dist/node_modules/gatsby-plugin-netlify 9:09:03 PM: - /opt/build/repo/node_modules/gatsby/node_modules/gatsby-plugin-netlify 9:09:03 PM: - /opt/build/repo/node_modules/gatsby-plugin-netlify 9:09:03 PM: - /opt/build/node_modules/gatsby-plugin-netlify 9:09:03 PM: - /opt/node_modules/gatsby-plugin-netlify 9:09:03 PM: - /node_modules/gatsby-plugin-netlify 9:09:03 PM: not finished open and validate gatsby-configs - 0.108s 9:09:03 PM: Skipping functions preparation step: no functions directory set 9:09:03 PM: Caching artifacts 9:09:03 PM: Started saving node modules 9:09:03 PM: Finished saving node modules 9:09:03 PM: Started saving pip cache 9:09:04 PM: Finished saving pip cache 9:09:04 PM: Started saving emacs cask dependencies 9:09:04 PM: Finished saving emacs cask dependencies 9:09:04 PM: Started saving maven dependencies 9:09:04 PM: Finished saving maven dependencies 9:09:04 PM: Started saving boot dependencies 9:09:04 PM: Finished saving boot dependencies 9:09:04 PM: Started saving go dependencies 9:09:04 PM: Finished saving go dependencies 9:09:06 PM: Error running command: Build script returned non-zero exit code: 1 9:09:06 PM: Failing build: Failed to build site 9:09:06 PM: failed during stage 'building site': Build script returned non-zero exit code: 1 9:09:06 PM: Finished processing build request in 56.727724225s
Summary
Build is running successfully in local machine, but failing in netlify
Environment (if relevant)
System: OS: Windows 10 CPU: x64 Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz Binaries: Yarn: 1.7.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 5.6.0 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: 42.17134.1.0 npmPackages: gatsby: ^1.9.273 => 1.9.273 gatsby-image: ^1.0.54 => 1.0.54 gatsby-link: ^1.6.45 => 1.6.45 gatsby-paginate: ^1.0.16 => 1.0.16 gatsby-pagination: ^1.2.0 => 1.2.0 gatsby-plugin-catch-links: ^1.0.24 => 1.0.24 gatsby-plugin-feed: ^1.3.25 => 1.3.25 gatsby-plugin-google-analytics: ^1.0.31 => 1.0.31 gatsby-plugin-manifest: ^1.0.27 => 1.0.27 gatsby-plugin-nprogress: ^1.0.14 => 1.0.14 gatsby-plugin-offline: ^1.0.18 => 1.0.18 gatsby-plugin-react-helmet: ^2.0.11 => 2.0.11 gatsby-plugin-sass: ^1.0.26 => 1.0.26 gatsby-plugin-sharp: ^1.6.48 => 1.6.48 gatsby-plugin-sitemap: ^1.2.25 => 1.2.25 gatsby-remark-component: ^1.1.3 => 1.1.3 gatsby-remark-copy-linked-files: ^1.5.37 => 1.5.37 gatsby-remark-images: ^1.5.67 => 1.5.67 gatsby-remark-prismjs: ^2.0.4 => 2.0.4 gatsby-remark-responsive-iframe: ^1.4.20 => 1.4.20 gatsby-remark-smartypants: ^1.4.12 => 1.4.12 gatsby-source-filesystem: ^1.5.39 => 1.5.39 gatsby-transformer-remark: ^1.7.44 => 1.7.44 gatsby-transformer-sharp: ^1.6.27 => 1.6.27
File contents (if changed)
gatsby-config.js:
package.json
gatsby-node.js
gatsby-browser.js
gatsby-ssr.js