Giter Site home page Giter Site logo

Comments (11)

ascorbic avatar ascorbic commented on June 10, 2024 1

Hi @emarchak. That sounds like you have an old version of a binary installed. Could you try "clear cache and deploy" in the site dashboard?

from netlify-plugin-gatsby.

ascorbic avatar ascorbic commented on June 10, 2024 1

Ah ok. You're using version 1 of the plugin. If you're using Gatsby 4, you should upgrade to the version 2 beta. See the readme for details of how to do it

from netlify-plugin-gatsby.

ascorbic avatar ascorbic commented on June 10, 2024 1

I'm closing this. If anybody is experiencing the same issue with version 2 of the build plugin, please open a new issue.

from netlify-plugin-gatsby.

emarchak avatar emarchak commented on June 10, 2024

Update!

Ah, I read the readme and it looks like the v2 version of this plugin needs to be manually installed (not enabled via the Netlify Plugins UI) and only supports Gatsby 4.x.

I'm running Gatsby 3.14.2, and since I installed it via the UI, it looks like I was on v1.0.3 of the plugin.

from netlify-plugin-gatsby.

ChuaTheDog avatar ChuaTheDog commented on June 10, 2024

I have the same issue. The Option "Clear cache and deploy" does not help. Updating to gatsby 4 is causing issues due to other dependencies not your updated.

from netlify-plugin-gatsby.

ascorbic avatar ascorbic commented on June 10, 2024

Can you set the env var AWS_LAMBDA_JS_RUNTIME in the UI to nodejs14.x, and NODE_VERSION to 14

from netlify-plugin-gatsby.

ChuaTheDog avatar ChuaTheDog commented on June 10, 2024

Did not work. Still got the issue with node-sass

from netlify-plugin-gatsby.

ascorbic avatar ascorbic commented on June 10, 2024

Can you share the full logs

from netlify-plugin-gatsby.

ChuaTheDog avatar ChuaTheDog commented on June 10, 2024

10:32:18 AM: Build ready to start
10:32:19 AM: build-image version: c5b01a919d3e16af69445c5de0cacb49efbb1a23 (focal)
10:32:19 AM: build-image tag: v4.4.0
10:32:19 AM: buildbot version: f02fd0bfaf4d9deaa39681e4440772fbbd5ef7a5
10:32:19 AM: Building without cache
10:32:19 AM: Starting to prepare the repo for build
10:32:20 AM: No cached dependencies found. Cloning fresh repo
10:32:20 AM: git clone https://github.com/ChuaTheDog/denniseitner
10:32:22 AM: Preparing Git Reference refs/heads/development
10:32:23 AM: Parsing package.json dependencies
10:32:23 AM: Different functions path detected, going to use the one specified in the Netlify configuration file: 'functions' versus 'functions/' in the Netlify UI
10:32:24 AM: Starting build script
10:32:24 AM: Installing dependencies
10:32:24 AM: Python version set to 2.7
10:32:24 AM: Downloading and installing node v14.18.1...
10:32:25 AM: Downloading https://nodejs.org/dist/v14.18.1/node-v14.18.1-linux-x64.tar.xz...
10:32:25 AM: Computing checksum with sha256sum
10:32:25 AM: Checksums matched!
10:32:28 AM: Now using node v14.18.1 (npm v6.14.15)
10:32:28 AM: Started restoring cached build plugins
10:32:28 AM: Finished restoring cached build plugins
10:32:28 AM: Attempting ruby version 2.7.2, read from environment
10:32:29 AM: Using ruby version 2.7.2
10:32:30 AM: Using PHP version 8.0
10:32:30 AM: Started restoring cached node modules
10:32:30 AM: Finished restoring cached node modules
10:32:30 AM: Installing NPM modules using NPM version 6.14.15
10:33:48 AM: npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
10:33:48 AM: > [email protected] install /opt/build/repo/node_modules/sharp
10:33:48 AM: > (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
10:33:50 AM: sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.11.3/libvips-8.11.3-linux-x64.tar.br
10:33:51 AM: > [email protected] install /opt/build/repo/node_modules/puppeteer
10:33:51 AM: > node install.js
10:33:59 AM: Chromium (756035) downloaded to /opt/build/repo/node_modules/puppeteer/.local-chromium/linux-756035
10:33:59 AM: > [email protected] install /opt/build/repo/node_modules/node-sass
10:33:59 AM: > node scripts/install.js
10:34:00 AM: Downloading binary from https://github.com/sass/node-sass/releases/download/v6.0.1/linux-x64-83_binding.node
10:34:00 AM: Download complete
10:34:00 AM: Binary saved to /opt/build/repo/node_modules/node-sass/vendor/linux-x64-83/binding.node
10:34:00 AM: Caching binary to /opt/buildhome/.npm/node-sass/6.0.1/linux-x64-83_binding.node
10:34:00 AM: > [email protected] postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js
10:34:00 AM: > node -e "try{require('./postinstall')}catch(e){}"
10:34:00 AM: > [email protected] postinstall /opt/build/repo/node_modules/core-js
10:34:00 AM: > node -e "try{require('./postinstall')}catch(e){}"
10:34:01 AM: > [email protected] postinstall /opt/build/repo/node_modules/core-js-pure
10:34:01 AM: > node -e "try{require('./postinstall')}catch(e){}"
10:34:02 AM: > [email protected] postinstall /opt/build/repo/node_modules/gatsby-telemetry
10:34:02 AM: > node src/postinstall.js || true
10:34:02 AM: > [email protected] postinstall /opt/build/repo/node_modules/gatsby-cli
10:34:02 AM: > node scripts/postinstall.js
10:34:02 AM: > [email protected] postinstall /opt/build/repo/node_modules/gatsby
10:34:02 AM: > node scripts/postinstall.js
10:34:02 AM: > [email protected] postinstall /opt/build/repo/node_modules/node-sass
10:34:02 AM: > node scripts/build.js
10:34:03 AM: Binary found at /opt/build/repo/node_modules/node-sass/vendor/linux-x64-83/binding.node
10:34:03 AM: Testing binary
10:34:03 AM: Binary is fine
10:34:05 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
10:34:05 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
10:34:05 AM: added 2390 packages from 1202 contributors and audited 2394 packages in 94.554s
10:34:08 AM: 273 packages are looking for funding
10:34:08 AM: run npm fund for details
10:34:08 AM: found 40 vulnerabilities (1 low, 22 moderate, 16 high, 1 critical)
10:34:08 AM: run npm audit fix to fix them, or npm audit for details
10:34:08 AM: NPM modules installed
10:34:08 AM: Started restoring cached go cache
10:34:08 AM: Finished restoring cached go cache
10:34:08 AM: go version go1.16.5 linux/amd64
10:34:08 AM: go version go1.16.5 linux/amd64
10:34:08 AM: Installing missing commands
10:34:08 AM: Verify run directory
10:34:10 AM: ​
10:34:10 AM: ────────────────────────────────────────────────────────────────
10:34:10 AM: Netlify Build
10:34:10 AM: ────────────────────────────────────────────────────────────────
10:34:10 AM: ​
10:34:10 AM: ❯ Version
10:34:10 AM: @netlify/build 18.21.3
10:34:10 AM: ​
10:34:10 AM: ❯ Flags
10:34:10 AM: baseRelDir: true
10:34:10 AM: buildId: 6184fa21cb6a00e625091e4e
10:34:10 AM: deployId: 6184fa21cb6a00e625091e50
10:34:10 AM: ​
10:34:10 AM: ❯ Current directory
10:34:10 AM: /opt/build/repo
10:34:10 AM: ​
10:34:10 AM: ❯ Config file
10:34:10 AM: /opt/build/repo/netlify.toml
10:34:10 AM: ​
10:34:10 AM: ❯ Context
10:34:10 AM: production
10:34:10 AM: ​
10:34:10 AM: ❯ Installing plugins
10:34:10 AM: - @netlify/[email protected]
10:34:20 AM: ​
10:34:20 AM: ❯ Loading plugins
10:34:20 AM: - @netlify/[email protected] from Netlify app
10:34:20 AM: ​
10:34:20 AM: ────────────────────────────────────────────────────────────────
10:34:20 AM: 1. @netlify/plugin-gatsby (onPreBuild event)
10:34:20 AM: ────────────────────────────────────────────────────────────────
10:34:20 AM: ​
10:34:21 AM: No Gatsby cache found. Building fresh.
10:34:21 AM: ​
10:34:21 AM: ────────────────────────────────────────────────────────────────
10:34:21 AM: Plugin "@netlify/plugin-gatsby" failed
10:34:21 AM: ────────────────────────────────────────────────────────────────
10:34:21 AM: ​
10:34:21 AM: Error message
10:34:21 AM: Error: Could not load gatsby-config.js
10:34:21 AM: Missing binding /opt/build/repo/node_modules/node-sass/vendor/linux-x64-72/binding.node
10:34:21 AM: Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 12.x
10:34:21 AM: ​
10:34:21 AM: Found bindings for the following environments:
10:34:21 AM: - Linux 64-bit with Node.js 14.x
10:34:21 AM: ​
10:34:21 AM: This usually happens because your environment has changed since running npm install.
10:34:21 AM: Run npm rebuild node-sass to download the binding for your current environment.
10:34:21 AM: ​
10:34:21 AM: Plugin details
10:34:21 AM: Package: @netlify/plugin-gatsby
10:34:21 AM: Version: 1.0.3
10:34:21 AM: Repository: git+https://github.com/netlify/netlify-plugin-gatsby.git
10:34:21 AM: npm link: https://www.npmjs.com/package/@netlify/plugin-gatsby
10:34:21 AM: Report issues: https://github.com/netlify/netlify-plugin-gatsby/issues
10:34:21 AM: ​
10:34:21 AM: Error location
10:34:21 AM: In "onPreBuild" event in "@netlify/plugin-gatsby" from Netlify app
10:34:21 AM: at module.exports (/node_modules/node-sass/lib/binding.js:15:13)
10:34:21 AM: ​
10:34:21 AM: Resolved config
10:34:21 AM: build:
10:34:21 AM: command: npm run build
10:34:21 AM: commandOrigin: ui
10:34:21 AM: environment:
10:34:21 AM: - AWS_LAMBDA_JS_RUNTIME
10:34:21 AM: - NODE_VERSION
10:34:21 AM: publish: /opt/build/repo/public
10:34:21 AM: publishOrigin: ui
10:34:21 AM: functionsDirectory: /opt/build/repo/functions
10:34:21 AM: plugins:
10:34:21 AM: - inputs: {}
10:34:21 AM: origin: ui
10:34:21 AM: package: '@netlify/plugin-gatsby'
10:34:21 AM: Caching artifacts
10:34:21 AM: Started saving node modules
10:34:21 AM: Finished saving node modules
10:34:21 AM: Started saving build plugins
10:34:21 AM: Finished saving build plugins
10:34:21 AM: Started saving pip cache
10:34:21 AM: Finished saving pip cache
10:34:21 AM: Started saving emacs cask dependencies
10:34:21 AM: Finished saving emacs cask dependencies
10:34:21 AM: Started saving maven dependencies
10:34:21 AM: Finished saving maven dependencies
10:34:21 AM: Started saving boot dependencies
10:34:21 AM: Finished saving boot dependencies
10:34:21 AM: Started saving rust rustup cache
10:34:21 AM: Finished saving rust rustup cache
10:34:21 AM: Started saving go dependencies
10:34:21 AM: Finished saving go dependencies
10:34:24 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
10:34:24 AM: Creating deploy upload records
10:34:24 AM: Failing build: Failed to build site
10:34:24 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2
10:34:24 AM: Finished processing build request in 2m5.101685851s

from netlify-plugin-gatsby.

ChuaTheDog avatar ChuaTheDog commented on June 10, 2024

V 1.0.3 is the latest version. Beta ist not available on npm. I am not using gatsby version 4 as there are other dependencies that are not compatible. Any other suggestion on how to resolve this?

from netlify-plugin-gatsby.

nadiavanleur avatar nadiavanleur commented on June 10, 2024

Simply running npm i --save @netlify/plugin-gatsby locally and pushing the updated package and package-lock ended up fixing this issue for me.

I don't understand why though. I had two duplicate repos on Netlify. One of them worked and the other one had the same error as mentioned here.

from netlify-plugin-gatsby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.