Hi!
address: babillard.netlify.app
My app uses firebase (auth, firestore, storage, functions) I only started using functions not long ago and since then, I get an error when deploying new updates.
There seems to be a conflict etween firebase functions and netlify functions.
I pasted the log. I can see that some solutions are proposed in there but I don’t undersatnd exactly what they mean. I’m still a newbie, so id someone could help me out here, it would be awesome.
Thanks in advance!
Eric
9:06:39 PM: Build ready to start
9:06:41 PM: build-image version: 8925038cf853b22d6397cdcb9904ac88b66bb383 (focal)
9:06:41 PM: build-image tag: v4.5.0
9:06:41 PM: buildbot version: fa6cc7f6d011b8899be97010416c5b5974d37673
9:06:41 PM: Fetching cached dependencies
9:06:41 PM: Starting to download cache of 185.1MB
9:06:42 PM: Finished downloading cache in 1.524865464s
9:06:42 PM: Starting to extract cache
9:06:49 PM: Finished extracting cache in 6.485649344s
9:06:49 PM: Finished fetching cache in 8.064123914s
9:06:49 PM: Starting to prepare the repo for build
9:06:49 PM: Preparing Git Reference refs/heads/master
9:06:49 PM: Parsing package.json dependencies
9:06:50 PM: Starting build script
9:06:50 PM: Installing dependencies
9:06:50 PM: Python version set to 2.7
9:06:50 PM: Started restoring cached node version
9:06:53 PM: Finished restoring cached node version
9:06:54 PM: v16.13.0 is already installed.
9:06:54 PM: Now using node v16.13.0 (npm v8.1.0)
9:06:54 PM: Started restoring cached build plugins
9:06:54 PM: Finished restoring cached build plugins
9:06:54 PM: Attempting ruby version 2.7.2, read from environment
9:06:56 PM: Using ruby version 2.7.2
9:06:56 PM: Using PHP version 8.0
9:06:56 PM: Started restoring cached node modules
9:06:56 PM: Finished restoring cached node modules
9:06:57 PM: Started restoring cached go cache
9:06:57 PM: Finished restoring cached go cache
9:06:57 PM: go version go1.16.5 linux/amd64
9:06:57 PM: go version go1.16.5 linux/amd64
9:06:57 PM: Installing missing commands
9:06:57 PM: Verify run directory
9:06:58 PM:
9:06:58 PM: ────────────────────────────────────────────────────────────────
9:06:58 PM: Netlify Build
9:06:58 PM: ────────────────────────────────────────────────────────────────
9:06:58 PM:
9:06:58 PM: ❯ Version
9:06:58 PM: @netlify/build 18.25.2
9:06:58 PM:
9:06:58 PM: ❯ Flags
9:06:58 PM: baseRelDir: true
9:06:58 PM: buildId: 619bf84ff9db387da6fa52a3
9:06:58 PM: deployId: 619bf84ff9db387da6fa52a5
9:06:58 PM:
9:06:58 PM: ❯ Current directory
9:06:58 PM: /opt/build/repo
9:06:58 PM:
9:06:58 PM: ❯ Config file
9:06:58 PM: /opt/build/repo/netlify.toml
9:06:58 PM:
9:06:58 PM: ❯ Context
9:06:58 PM: production
9:06:58 PM:
9:06:58 PM: ────────────────────────────────────────────────────────────────
9:06:58 PM: 1. Build command from Netlify app
9:06:58 PM: ────────────────────────────────────────────────────────────────
9:06:58 PM:
9:06:58 PM: $ npm run build
9:06:59 PM: > babillard@0.1.0 build
9:06:59 PM: > vue-cli-service build
9:07:00 PM: - Building for production...
9:07:17 PM: WARNING Compiled with 3 warnings8:07:17 PM
9:07:17 PM: warning
9:07:17 PM: asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
9:07:17 PM: This can impact web performance.
9:07:17 PM: Assets:
9:07:17 PM: js/chunk-vendors.75c0d639.js (804 KiB)
9:07:17 PM: warning
9:07:17 PM: entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
9:07:17 PM: Entrypoints:
9:07:17 PM: app (872 KiB)
9:07:17 PM: js/chunk-vendors.75c0d639.js
9:07:17 PM: css/app.0fa18cba.css
9:07:17 PM: js/app.acd97246.js
9:07:17 PM: warning
9:07:17 PM: webpack performance recommendations:
9:07:17 PM: You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
9:07:17 PM: For more info visit https://webpack.js.org/guides/code-splitting/
9:07:17 PM: File Size Gzipped
9:07:17 PM: dist/js/chunk-vendors.75c0d639.js 803.73 KiB 197.08 KiB
9:07:17 PM: dist/js/app.acd97246.js 58.48 KiB 14.60 KiB
9:07:17 PM: dist/css/app.0fa18cba.css 9.43 KiB 2.54 KiB
9:07:17 PM: Images and other types of assets omitted.
9:07:17 PM: DONE Build complete. The dist directory is ready to be deployed.
9:07:17 PM: INFO Check out deployment instructions at https://cli.vuejs.org/guide/deployment.html
9:07:18 PM:
9:07:18 PM: (build.command completed in 19.1s)
9:07:18 PM:
9:07:18 PM: ────────────────────────────────────────────────────────────────
9:07:18 PM: 2. Functions bundling
9:07:18 PM: ────────────────────────────────────────────────────────────────
9:07:18 PM:
9:07:18 PM: Packaging Functions from functions directory:
9:07:18 PM: - index.js
9:07:18 PM:
9:07:18 PM:
9:07:18 PM: ────────────────────────────────────────────────────────────────
9:07:18 PM: Dependencies installation error
9:07:18 PM: ────────────────────────────────────────────────────────────────
9:07:18 PM:
9:07:18 PM: Error message
9:07:18 PM: A Netlify Function is using "firebase-functions" but that dependency has not been installed yet.
9:07:18 PM:
9:07:18 PM: By default, dependencies inside a Netlify Function's "package.json" are not automatically installed.
There are several ways to fix this problem:
9:07:18 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.
9:07:18 PM: - Running "npm install" or "yarn" inside your Netlify Function in your build command.
9:07:18 PM: - Adding the following plugin to your "netlify.toml":
9:07:18 PM:
9:07:18 PM: [[plugins]]
9:07:18 PM: package = "@netlify/plugin-functions-install-core"
9:07:18 PM:
9:07:18 PM: In file "/opt/build/repo/functions/index.js"
9:07:18 PM: Cannot find module 'firebase-functions'
9:07:18 PM: Require stack:
9:07:18 PM: - /opt/buildhome/node-deps/node_modules/@netlify/zip-it-and-ship-it/dist/runtimes/node/bundlers/zisi/resolve.js
9:07:18 PM: - /opt/buildhome/node-deps/node_modules/@netlify/zip-it-and-ship-it/dist/runtimes/node/bundlers/zisi/traverse.js
9:07:18 PM: - /opt/buildhome/node-deps/node_modules/@netlify/zip-it-and-ship-it/dist/runtimes/node/bundlers/esbuild/src_files.js
9:07:18 PM: - /opt/buildhome/node-deps/node_modules/@netlify/zip-it-and-ship-it/dist/runtimes/node/bundlers/esbuild/index.js
9:07:18 PM: - /opt/buildhome/node-deps/node_modules/@netlify/zip-it-and-ship-it/dist/runtimes/node/bundlers/index.js
9:07:18 PM: - /opt/buildhome/node-deps/node_modules/@netlify/zip-it-and-ship-it/dist/runtimes/node/index.js
9:07:18 PM: - /opt/buildhome/node-deps/node_modules/@netlify/zip-it-and-ship-it/dist/runtimes/index.js
9:07:18 PM: - /opt/buildhome/node-deps/node_modules/@netlify/zip-it-and-ship-it/dist/main.js
9:07:18 PM: - /opt/buildhome/node-deps/node_modules/@netlify/build/src/plugins_core/functions/index.js
9:07:18 PM: - /opt/buildhome/node-deps/node_modules/@netlify/build/src/steps/get.js
9:07:18 PM: - /opt/buildhome/node-deps/node_modules/@netlify/build/src/core/main.js
9:07:18 PM: - /opt/buildhome/node-deps/node_modules/@netlify/build/src/core/bin.js
9:07:18 PM:
9:07:18 PM: Resolved config
9:07:18 PM: build:
9:07:18 PM: command: npm run build
9:07:18 PM: commandOrigin: ui
9:07:18 PM: publish: /opt/build/repo/dist
9:07:18 PM: publishOrigin: ui
9:07:18 PM: functionsDirectory: /opt/build/repo/functions
9:07:18 PM: redirects:
9:07:18 PM: - from: /*
status: 200
to: /index.html
redirectsOrigin: config
Caching artifacts
9:07:18 PM: Started saving node modules
9:07:18 PM: Finished saving node modules
9:07:18 PM: Started saving build plugins
9:07:18 PM: Finished saving build plugins
9:07:18 PM: Started saving pip cache
9:07:18 PM: Finished saving pip cache
9:07:18 PM: Started saving emacs cask dependencies
9:07:18 PM: Finished saving emacs cask dependencies
9:07:18 PM: Started saving maven dependencies
9:07:18 PM: Finished saving maven dependencies
9:07:18 PM: Started saving boot dependencies
9:07:18 PM: Finished saving boot dependencies
9:07:18 PM: Started saving rust rustup cache
9:07:18 PM: Finished saving rust rustup cache
9:07:18 PM: Started saving go dependencies
9:07:18 PM: Finished saving go dependencies
9:07:18 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
9:07:18 PM: Creating deploy upload records
9:07:18 PM: Failing build: Failed to build site
9:07:18 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
9:07:18 PM: Finished processing build request in 37.737802887s