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

fails to deploy #24

Open
Maxhodges opened this issue May 30, 2020 · 4 comments
Open

fails to deploy #24

Maxhodges opened this issue May 30, 2020 · 4 comments

Comments

@Maxhodges
Copy link

my site never goes live

an ideas?

9:38:08 PM: Started saving go dependencies
9:38:08 PM: Finished saving go dependencies
9:38:10 PM: Build script success
9:38:10 PM: Starting to deploy site from 'dist'
9:38:10 PM: Creating deploy tree 
9:38:11 PM: Creating deploy upload records
9:38:11 PM: 5 new files to upload
9:38:11 PM: 2 new functions to upload
9:38:28 PM: Finished processing build request in 53.374071864s

maybe i should remove the serverless functions? i'll try

@philhawksworth
Copy link
Owner

These are Netlify build logs?
Do you have a publish folder listed in your netlify.toml file or in your Netlify admin? It sounds like the build is all fine, so I wonder why the output might not be getting published.

Was this a manually created site or was this result of clicking the Deploy to Netlify button on the site /readme?

@philhawksworth
Copy link
Owner

Are you still experiencing an issue here @Maxhodges?

@asifm
Copy link

asifm commented Oct 13, 2020

Below is my Netlify log for a failed deployment. The diagnosis is pretty clear, so I guess I'll be able to fix it myself.

plugin error
Plugin "@netlify/plugin-functions-core" internal error

Error: A Netlify Function is using "node-fetch" but that dependency has not been installed yet.

By default, dependencies inside a Netlify Function's "package.json" are not automatically installed. There are several ways to fix this problem:

Removing your Function's "package.json" and adding the dependencies to the project's top-level "package.json" instead. This is the fastest and safest solution.
Running "npm install" or "yarn" inside your Netlify Function in your build command.
Adding the following plugin to your "netlify.toml":
[plugins] package = "@netlify/plugin-functions-install-core"

In file "/opt/build/repo/src/functions/fetch-joke/fetch-joke.js": Cannot find module 'node-fetch' Require stack:

/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/resolve.js
/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/dependencies.js
/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/main.js
/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins_core/functions/index.js
/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins/child/logic.js
/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins/child/load.js
/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins/child/main.js
In "onBuild" event in "@netlify/plugin-functions-core" from core at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15) at Function.resolve (internal/modules/cjs/helpers.js:83:19) at resolvePathFollowSymlinks (/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/resolve.js:62:18) at resolvePackageFallback (/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/resolve.js:74:24) at resolvePackage (/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/resolve.js:33:27)

Error properties: { code: 'MODULE_NOT_FOUND' }

@mahemoff
Copy link

Similar issue here after clicking the Deploy button, log below. The most recent project deploy is also showing this node-fetch issue: https://app.netlify.com/sites/eleventyone/deploys/5f5bb117eac31e0007d70d33

7:53:29 PM: Build ready to start
7:53:31 PM: build-image version: b0258b965567defc4a2d7e2f2dec2e00c8f73ad6
7:53:31 PM: build-image tag: v3.4.1
7:53:31 PM: buildbot version: dad983e1697e9903da960ad66ea1950c0f15890b
7:53:31 PM: Fetching cached dependencies
7:53:31 PM: Failed to fetch cache, continuing with build
7:53:31 PM: Starting to prepare the repo for build
7:53:31 PM: No cached dependencies found. Cloning fresh repo
7:53:31 PM: git clone https://github.com/philhawksworth/eleventyone
7:53:32 PM: Preparing Git Reference refs/heads/master
7:53:33 PM: Different functions path detected, going to use the one specified in the Netlify configuration file: 'src/functions' versus '' in the Netlify UI
7:53:33 PM: Starting build script
7:53:34 PM: Installing dependencies
7:53:34 PM: Python version set to 2.7
7:53:35 PM: v12.18.0 is already installed.
7:53:36 PM: Now using node v12.18.0 (npm v6.14.4)
7:53:36 PM: Started restoring cached build plugins
7:53:36 PM: Finished restoring cached build plugins
7:53:36 PM: Attempting ruby version 2.7.1, read from environment
7:53:37 PM: Using ruby version 2.7.1
7:53:38 PM: Using PHP version 5.6
7:53:38 PM: 5.2 is already installed.
7:53:38 PM: Using Swift version 5.2
7:53:38 PM: Started restoring cached node modules
7:53:38 PM: Finished restoring cached node modules
7:53:38 PM: Installing NPM modules using NPM version 6.14.4
7:53:54 PM: > [email protected] postinstall /opt/build/repo/node_modules/core-js
7:53:54 PM: > node scripts/postinstall || echo "ignore"
7:53:55 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
7:53:55 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
7:53:55 PM: added 802 packages from 550 contributors and audited 875 packages in 16.564s
7:53:56 PM: found 549 vulnerabilities (449 low, 100 high)
7:53:56 PM:   run `npm audit fix` to fix them, or `npm audit` for details
7:53:56 PM: NPM modules installed
7:53:56 PM: Started restoring cached go cache
7:53:56 PM: Finished restoring cached go cache
7:53:56 PM: go version go1.14.4 linux/amd64
7:53:56 PM: go version go1.14.4 linux/amd64
7:53:56 PM: Installing missing commands
7:53:56 PM: Verify run directory
7:53:57 PM: ​
7:53:57 PM: ┌─────────────────────────────┐
7:53:57 PM: │        Netlify Build        │
7:53:57 PM: └─────────────────────────────┘
7:53:57 PM: ​
7:53:57 PM: ❯ Version
7:53:57 PM:   @netlify/build 5.0.0
7:53:57 PM: ​
7:53:57 PM: ❯ Flags
7:53:57 PM:   deployId: 5f880e095f820bd71375f145
7:53:57 PM:   mode: buildbot
7:53:57 PM: ​
7:53:57 PM: ❯ Current directory
7:53:57 PM:   /opt/build/repo
7:53:57 PM: ​
7:53:57 PM: ❯ Config file
7:53:57 PM:   /opt/build/repo/netlify.toml
7:53:57 PM: ​
7:53:57 PM: ❯ Context
7:53:57 PM:   production
7:53:58 PM: ​
7:53:58 PM: ┌────────────────────────────────────┐
7:53:58 PM: │ 1. build.command from netlify.toml │
7:53:58 PM: └────────────────────────────────────┘
7:53:58 PM: ​
7:53:58 PM: $ npm run build
7:53:59 PM: > [email protected] build /opt/build/repo
7:53:59 PM: > cross-env ELEVENTY_ENV=prod eleventy
7:54:01 PM: Browserslist: caniuse-lite is outdated. Please run next command `npm update`
7:54:01 PM: You did not set any plugins, parser, or stringifier. Right now, PostCSS does nothing. Pick plugins for your case on https://www.postcss.parts/ and use them in postcss.config.js.
7:54:01 PM: You did not set any plugins, parser, or stringifier. Right now, PostCSS does nothing. Pick plugins for your case on https://www.postcss.parts/ and use them in postcss.config.js.
7:54:02 PM: Writing dist/css/styles.css from ./src/site/css/styles.11ty.js.
7:54:02 PM: Writing dist/search.json from ./src/site/search.njk.
7:54:02 PM: Writing dist/sitemap.xml from ./src/site/sitemap.njk.
7:54:02 PM: Writing dist/about/index.html from ./src/site/about.md.
7:54:02 PM: Writing dist/index.html from ./src/site/index.md.
7:54:02 PM: Writing dist/posts/another-post/index.html from ./src/site/posts/another-post.md.
7:54:02 PM: Writing dist/posts/a-post/index.html from ./src/site/posts/a-post.md.
7:54:02 PM: Benchmark (Data): `./src/site/_data/prod/hawksworx.js` took 384ms (15.4%)
7:54:02 PM: Benchmark (Data): `./src/site/_data/prod/medium.js` took 539ms (21.6%)
7:54:02 PM: Copied 1 item and Processed 7 files in 2.42 seconds
7:54:02 PM: ​
7:54:02 PM: (build.command completed in 3.7s)
7:54:02 PM: ​
7:54:02 PM: ┌────────────────────────────────────────────────────────┐
7:54:02 PM: │ 2. onBuild command from @netlify/plugin-functions-core │
7:54:02 PM: └────────────────────────────────────────────────────────┘
7:54:02 PM: ​
7:54:02 PM: Packaging Functions from src/functions directory:
7:54:02 PM:  - fetch-joke/fetch-joke.js
7:54:02 PM:  - hello/hello.js
7:54:02 PM: ​
7:54:02 PM: ┌────────────────────────────────────────────────────────┐
7:54:02 PM: │ Plugin "@netlify/plugin-functions-core" internal error │
7:54:02 PM: └────────────────────────────────────────────────────────┘
7:54:02 PM: ​
7:54:02 PM:   Error message
7:54:02 PM:   Error: A Netlify Function is using "node-fetch" but that dependency has not been installed yet.
7:54:02 PM: ​
7:54:02 PM:   By default, dependencies inside a Netlify Function's "package.json" are not automatically installed.  There are several ways to fix this problem:
7:54:02 PM:     - Removing your Function's "package.json" and adding the dependencies to the project's top-level "package.json" instead. This is the fastest and safest solution.
7:54:02 PM:     - Running "npm install" or "yarn" inside your Netlify Function in your build command.
7:54:02 PM:     - Adding the following plugin to your "netlify.toml":
7:54:02 PM: ​
7:54:02 PM:   [[plugins]]
7:54:02 PM:   package = "@netlify/plugin-functions-install-core"
7:54:02 PM: ​
7:54:02 PM:   In file "/opt/build/repo/src/functions/fetch-joke/fetch-joke.js": Cannot find module 'node-fetch'
7:54:02 PM:   Require stack:
7:54:02 PM:   - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/resolve.js
7:54:02 PM:   - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/dependencies.js
7:54:02 PM:   - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/main.js
7:54:02 PM:   - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins_core/functions/index.js
7:54:02 PM:   - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins/child/logic.js
7:54:02 PM:   - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins/child/load.js
7:54:02 PM:   - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins/child/main.js
7:54:02 PM: ​
7:54:02 PM:   Plugin details
7:54:02 PM:   Package:        @netlify/plugin-functions-core
7:54:02 PM:   Version:        5.0.0
7:54:02 PM:   Repository:     git+https://github.com/netlify/build.git
7:54:02 PM:   npm link:       https://www.npmjs.com/package/@netlify/build
7:54:02 PM:   Report issues:  https://github.com/netlify/build/issues
7:54:02 PM: ​
7:54:02 PM:   Error location
7:54:02 PM:   In "onBuild" event in "@netlify/plugin-functions-core" from core
7:54:02 PM:       at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15)
7:54:02 PM:       at Function.resolve (internal/modules/cjs/helpers.js:83:19)
7:54:02 PM:       at resolvePathFollowSymlinks (/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/resolve.js:62:18)
7:54:02 PM:       at resolvePackageFallback (/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/resolve.js:74:24)
7:54:02 PM:       at resolvePackage (/opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/resolve.js:33:27)
7:54:02 PM: ​
7:54:02 PM:   Error properties
7:54:02 PM:   { code: 'MODULE_NOT_FOUND' }
7:54:02 PM: ​
7:54:02 PM:   Resolved config
7:54:02 PM:   build:
7:54:02 PM:     command: npm run build
7:54:02 PM:     commandOrigin: config
7:54:02 PM:     functions: /opt/build/repo/src/functions
7:54:02 PM:     publish: /opt/build/repo/dist
7:54:02 PM:   redirects:
7:54:02 PM:     - from: /api/*      status: 200      to: '/.netlify/functions/:splat'Caching artifacts
7:54:02 PM: Started saving node modules
7:54:02 PM: Finished saving node modules
7:54:02 PM: Started saving build plugins
7:54:02 PM: Finished saving build plugins
7:54:02 PM: Started saving pip cache
7:54:02 PM: Finished saving pip cache
7:54:02 PM: Started saving emacs cask dependencies
7:54:02 PM: Finished saving emacs cask dependencies
7:54:02 PM: Started saving maven dependencies
7:54:02 PM: Finished saving maven dependencies
7:54:02 PM: Started saving boot dependencies
7:54:02 PM: Finished saving boot dependencies
7:54:02 PM: Started saving go dependencies
7:54:02 PM: Finished saving go dependencies
7:54:05 PM: Build failed due to an internal system error: Build script returned non-zero exit code: 4
7:54:05 PM: Failing build: Failed to build site
7:54:05 PM: Failed during stage 'building site': Build script returned non-zero exit code: 4
7:54:05 PM: Finished processing build request in 34.440026596s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants