Home
Support Forums

The XMLHttpRequest compatibility library was not found (Firebase, Svelte)

My site name is https://plug.cool

My stack is:
Svelte + Sveltekit
Firebase

I’m not sure if this is a Netlify issue, a Firebase issue, or a Svelte/kit issue but I figured I’d put it up and see if anyone’s dealt with something similar before.

What I’m trying to do is import the Production version of Firebase. The imports look like this:

import firebase from '@firebase/app';
import '@firebase/auth';
import '@firebase/firestore';

I’ve changed it from this:

import firebase from 'firebase';

The reason I want the production build of Firebase is because of a separate issue I’m having. On a dynamic route, if I click the link to navigate to it, it works fine. However, if I navigate directly to it I get the following error on the page:

{"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"Error: ENOENT: no such file or directory, open '/var/task/functions/protos/google/firestore/v1/firestore.proto'","trace":["Runtime.UnhandledPromiseRejection: Error: ENOENT: no such file or directory, open '/var/task/functions/protos/google/firestore/v1/firestore.proto'"," at process.<anonymous> (/var/runtime/index.js:35:15)"," at process.emit (events.js:314:20)"," at processPromiseRejections (internal/process/promises.js:209:33)"," at processTicksAndRejections (internal/process/task_queues.js:98:32)"]}

I don’t know exactly what this means but I figure that potentially using the production build of Firebase may fix this.

The build log is:

11:17:41 AM: Build ready to start
11:17:43 AM: build-image version: 2cee85eb7f808bf3b6e87378c5307f9411f0a332
11:17:43 AM: build-image tag: v3.8.0
11:17:43 AM: buildbot version: b7aeb2675f82192daa8545b22bebab9c3b179d0e
11:17:43 AM: Fetching cached dependencies
11:17:43 AM: Starting to download cache of 184.1MB
11:17:44 AM: Finished downloading cache in 1.019564021s
11:17:44 AM: Starting to extract cache
11:17:51 AM: Finished extracting cache in 6.900656235s
11:17:51 AM: Finished fetching cache in 7.964070563s
11:17:51 AM: Starting to prepare the repo for build
11:17:51 AM: Preparing Git Reference refs/heads/main
11:17:52 AM: Parsing package.json dependencies
11:17:53 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘build’ versus ‘public’ in the Netlify UI
11:17:53 AM: Different functions path detected, going to use the one specified in the Netlify configuration file: ‘functions’ versus ‘’ in the Netlify UI
11:17:53 AM: Starting build script
11:17:53 AM: Installing dependencies
11:17:53 AM: Python version set to 2.7
11:17:53 AM: Started restoring cached node version
11:17:56 AM: Finished restoring cached node version
11:17:57 AM: v14.17.0 is already installed.
11:17:58 AM: Now using node v14.17.0 (npm v6.14.13)
11:17:58 AM: Started restoring cached build plugins
11:17:58 AM: Finished restoring cached build plugins
11:17:58 AM: Attempting ruby version 2.7.2, read from environment
11:17:59 AM: Using ruby version 2.7.2
11:18:00 AM: Using PHP version 5.6
11:18:00 AM: Started restoring cached node modules
11:18:00 AM: Finished restoring cached node modules
11:18:00 AM: Installing NPM modules using NPM version 6.14.13
11:18:08 AM: npm WARN @babel/helper-compilation-targets@7.14.5 requires a peer of @babel/core@^7.0.0 but none is installed. You must install peer dependencies yourself.
11:18:08 AM: npm WARN @babel/helper-define-polyfill-provider@0.2.3 requires a peer of @babel/core@^7.4.0-0 but none is installed. You must install peer dependencies yourself.
11:18:08 AM: npm WARN @babel/plugin-transform-runtime@7.14.5 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
11:18:08 AM: npm WARN babel-plugin-polyfill-corejs2@0.2.2 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
11:18:08 AM: npm WARN babel-plugin-polyfill-corejs3@0.2.3 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
11:18:08 AM: npm WARN babel-plugin-polyfill-regenerator@0.2.2 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
11:18:08 AM: npm WARN react-qr-reader@2.2.1 requires a peer of react@~16 but none is installed. You must install peer dependencies yourself.
11:18:08 AM: npm WARN react-qr-reader@2.2.1 requires a peer of react-dom@~16 but none is installed. You must install peer dependencies yourself.
11:18:08 AM: npm WARN plug.cool@0.0.1 No repository field.
11:18:08 AM: npm WARN plug.cool@0.0.1 No license field.
11:18:08 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
11:18:08 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
11:18:09 AM: removed 2 packages in 7.826s
11:18:09 AM: 96 packages are looking for funding
11:18:09 AM: run npm fund for details
11:18:09 AM: NPM modules installed
11:18:10 AM: Started restoring cached go cache
11:18:10 AM: Finished restoring cached go cache
11:18:10 AM: go version go1.14.4 linux/amd64
11:18:10 AM: go version go1.14.4 linux/amd64
11:18:10 AM: Installing missing commands
11:18:10 AM: Verify run directory
11:18:10 AM: ​
11:18:10 AM: ────────────────────────────────────────────────────────────────
11:18:10 AM: Netlify Build
11:18:10 AM: ────────────────────────────────────────────────────────────────
11:18:10 AM: ​
11:18:10 AM: ❯ Version
11:18:10 AM: @netlify/build 12.26.0
11:18:10 AM: ​
11:18:10 AM: ❯ Flags
11:18:10 AM: deployId: 60e08da5942aae00077ea5bc
11:18:10 AM: ​
11:18:10 AM: ❯ Current directory
11:18:10 AM: /opt/build/repo
11:18:10 AM: ​
11:18:10 AM: ❯ Config file
11:18:10 AM: /opt/build/repo/netlify.toml
11:18:10 AM: ​
11:18:10 AM: ❯ Context
11:18:10 AM: production
11:18:10 AM: ​
11:18:10 AM: ────────────────────────────────────────────────────────────────
11:18:10 AM: 1. build.command from netlify.toml
11:18:10 AM: ────────────────────────────────────────────────────────────────
11:18:10 AM: ​
11:18:10 AM: $ npm run build
11:18:11 AM: > plug.cool@0.0.1 build /opt/build/repo
11:18:11 AM: > svelte-kit build
11:18:11 AM: vite v2.3.7 building for production…
11:18:12 AM: transforming…
11:18:41 AM: Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification
11:18:41 AM: Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification
11:18:41 AM: Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification
11:18:41 AM: Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification
11:18:59 AM: [vite-plugin-svelte] The following packages did not export their package.json file so we could not check the “svelte” field. If you had difficulties importing svelte components from a package, then please contact the author and ask them to export the package.json file.
11:18:59 AM: - @pedrouid/iso-random
11:18:59 AM: ✓ 4671 modules transformed.
11:19:04 AM: rendering chunks…
11:20:24 AM: .svelte-kit/output/client/_app/manifest.json 28.58kb
11:20:25 AM: .svelte-kit/output/client/_app/start-7d709103.js 18.96kb / brotli: 5.80kb
11:20:25 AM: .svelte-kit/output/client/_app/pages/__layout.svelte-8cb0af56.js 3.12kb / brotli: 1.20kb
11:20:25 AM: .svelte-kit/output/client/_app/error.svelte-ff811f4e.js 1.19kb / brotli: 0.57kb
11:20:25 AM: .svelte-kit/output/client/_app/pages/address/WalletStatBox.svelte-34405c76.js 1.21kb / brotli: 0.62kb
11:20:25 AM: .svelte-kit/output/client/_app/pages/address/NFTStatBox.svelte-f0e4d6fa.js 1.22kb / brotli: 0.63kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/utils-2e6460f8.js 1.13kb / brotli: 0.54kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/Loading.svelte_svelte&type=style&lang-8ac8090b.js 0.87kb / brotli: 0.46kb
11:20:25 AM: .svelte-kit/output/client/_app/pages/address/[slug].svelte-6a919575.js 5.99kb / brotli: 1.86kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/content-612bd04b-f724d7c3.js 1.81kb / brotli: 0.57kb
11:20:25 AM: .svelte-kit/output/client/_app/pages/index.svelte-d601f27d.js 32.28kb / brotli: 7.86kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/web3-250a587a.js 8.53kb / brotli: 2.56kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/fortmatic-d7b2c7e1-17098024.js 2.24kb / brotli: 0.96kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/authereum-4847f17d-21f54b86.js 8.72kb / brotli: 5.47kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/metamask-61289acd-a8f21184.js 5.60kb / brotli: 3.91kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/trust-7f9f5bc7-d593cd08.js 4.37kb / brotli: 1.79kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/coinbase-ff2019aa-36e7e676.js 0.99kb / brotli: 0.51kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/icon-coinbase-7f74eb94-4671098b.js 0.77kb / brotli: 0.33kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/portis-4a4eb2a3-bb0b590f.js 8.11kb / brotli: 3.02kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/wallet-connect-ebd1e90b-e99d5207.js 4.05kb / brotli: 1.61kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/opera-b328ed05-29859f0e.js 5.50kb / brotli: 3.85kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/torus-c5e34fcf-ecc65420.js 2.98kb / brotli: 1.22kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/status-b68b10b3-078bde8d.js 1.87kb / brotli: 0.88kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/opera-touch-269c38a9-80d586f2.js 7.07kb / brotli: 4.92kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/trezor-cdb1556f-7caf10b3.js 11.25kb / brotli: 3.19kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/lattice-a75f4619-25659504.js 9.21kb / brotli: 3.37kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/events-25cf1eb9.js 5.91kb / brotli: 1.80kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/___vite-browser-external_commonjs-proxy-2e08defe.js 0.13kb / brotli: 0.11kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/hdkey-01a10e1d.js 4.33kb / brotli: 1.37kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/index-48cef358.js 2.10kb / brotli: 0.96kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/inherits_browser-a9f6696c.js 0.34kb / brotli: 0.17kb
11:20:25 AM: .svelte-kit/output/client/_app/chunks/index-8f456e3a.js 22.90kb / brotli: 6.33kb
11:20:26 AM: .svelte-kit/output/client/_app/chunks/index-f3822242.js 58.66kb / brotli: 12.89kb
11:20:26 AM: .svelte-kit/output/client/_app/chunks/index-9100d29b.js 48.62kb / brotli: 10.80kb
11:20:26 AM: .svelte-kit/output/client/_app/chunks/wallet-link-b78ddc0e-05fed551.js 1.40kb / brotli: 0.63kb
11:20:26 AM: .svelte-kit/output/client/_app/chunks/imtoken-869ee010-43545214.js 3.11kb / brotli: 1.44kb
11:20:26 AM: .svelte-kit/output/client/_app/chunks/ledger-071f7446-c70599fa.js 15.21kb / brotli: 4.30kb
11:20:26 AM: .svelte-kit/output/client/_app/chunks/bn-a64b2011.js 42.24kb / brotli: 9.07kb
11:20:26 AM: .svelte-kit/output/client/_app/chunks/mykey-2462e246-95d471b2.js 11.50kb / brotli: 7.96kb
11:20:26 AM: .svelte-kit/output/client/_app/chunks/huobiwallet-7d0f6208-d902c97a.js 3.22kb / brotli: 1.35kb
11:20:26 AM: .svelte-kit/output/client/_app/chunks/hyperpay-cb53c487-6dad8122.js 8.04kb / brotli: 5.71kb
11:20:26 AM: .svelte-kit/output/client/_app/chunks/wallet-io-647e5e5c-c8d02dab.js 5.04kb / brotli: 2.15kb
11:20:26 AM: .svelte-kit/output/client/_app/chunks/tokenpocket-3b49fdba-cf24f94b.js 14.12kb / brotli: 10.03kb
11:20:26 AM: .svelte-kit/output/client/_app/chunks/dcent-aad7ab41-a42f8854.js 2.23kb / brotli: 1.07kb
11:20:26 AM: .svelte-kit/output/client/_app/chunks/frame-59afc78b-b37cb774.js 9.50kb / brotli: 5.02kb
11:20:26 AM: .svelte-kit/output/client/_app/chunks/atoken-68fc48b8-eb1044a8.js 19.23kb / brotli: 13.08kb
11:20:26 AM: .svelte-kit/output/client/_app/chunks/alphawallet-c2b03318-32db85ab.js 7.09kb / brotli: 2.84kb
11:20:26 AM: .svelte-kit/output/client/_app/chunks/ownbit-b933af7e-53b6d184.js 2.68kb / brotli: 1.29kb
11:20:26 AM: .svelte-kit/output/client/_app/chunks/xdefi-041b1a64-5afda1d4.js 17.81kb / brotli: 12.78kb
11:20:26 AM: .svelte-kit/output/client/_app/chunks/bitpie-a7acfe0e-a18715ee.js 4.20kb / brotli: 1.63kb
11:20:26 AM: .svelte-kit/output/client/_app/chunks/gnosis-19b90e57-144a4ed3.js 3.12kb / brotli: 1.19kb
11:20:26 AM: .svelte-kit/output/client/_app/chunks/connect-5413cff8-73d8e2cd.js 1.31kb / brotli: 0.58kb
11:20:26 AM: .svelte-kit/output/client/_app/chunks/network-b7210dfd-6c7f6e26.js 1.58kb / brotli: 0.71kb
11:20:26 AM: .svelte-kit/output/client/_app/chunks/balance-41bdb040-8da0b86a.js 1.30kb / brotli: 0.60kb
11:20:27 AM: .svelte-kit/output/client/_app/chunks/fortmatic-ccd65295.js 34.94kb / brotli: 6.98kb
11:20:27 AM: .svelte-kit/output/client/_app/chunks/index-9322624f.js 1.04kb / brotli: 0.49kb
11:20:27 AM: .svelte-kit/output/client/_app/chunks/semaphore-2757d7ee.js 7.82kb / brotli: 2.87kb
11:20:27 AM: .svelte-kit/output/client/_app/chunks/util-8dff0ec6.js 24.69kb / brotli: 6.81kb
11:20:27 AM: .svelte-kit/output/client/_app/chunks/index-43b87950.js 32.35kb / brotli: 6.70kb
11:20:27 AM: .svelte-kit/output/client/_app/chunks/index-e73e33e6.js 3.44kb / brotli: 1.37kb
11:20:27 AM: .svelte-kit/output/client/_app/chunks/subscriptionManager-882c245e.js 42.63kb / brotli: 11.63kb
11:20:27 AM: .svelte-kit/output/client/_app/chunks/parallel-ad81a02c.js 7.57kb / brotli: 1.75kb
11:20:27 AM: .svelte-kit/output/client/_app/chunks/setPrototypeOf-8b7731b2.js 1.91kb / brotli: 0.55kb
11:20:27 AM: .svelte-kit/output/client/_app/chunks/possibleConstructorReturn-a67d2e55.js 1.12kb / brotli: 0.44kb
11:20:27 AM: .svelte-kit/output/client/_app/chunks/interopRequireWildcard-b9ed892d.js 0.88kb / brotli: 0.38kb
11:20:27 AM: .svelte-kit/output/client/_app/chunks/url-38850fba.js 10.04kb / brotli: 3.72kb
11:20:27 AM: .svelte-kit/output/client/_app/chunks/providerEngine-44e304f1-96f4e382.js 38.69kb / brotli: 10.02kb
11:20:27 AM: .svelte-kit/output/client/_app/chunks/hd-wallet-642b97e3-4931ee1c.js 1.08kb / brotli: 0.49kb
11:20:27 AM: .svelte-kit/output/client/_app/chunks/index-9f4c530b.js 24.68kb / brotli: 6.55kb
11:20:27 AM: .svelte-kit/output/client/_app/chunks/index-09c56852.js 2.25kb / brotli: 0.95kb
11:20:28 AM: .svelte-kit/output/client/_app/chunks/TransportWebUSB-b019e1a8.js 34.31kb / brotli: 10.05kb
11:20:28 AM: .svelte-kit/output/client/_app/chunks/index-abc25110.js 46.56kb / brotli: 12.41kb
11:20:28 AM: .svelte-kit/output/client/_app/chunks/Transport-071d1d08.js 2.39kb / brotli: 0.99kb
11:20:28 AM: .svelte-kit/output/client/_app/chunks/TransportU2F-bae8e2b1.js 7.55kb / brotli: 2.60kb
11:20:28 AM: .svelte-kit/output/client/_app/chunks/index-1b60ee86.js 8.43kb / brotli: 2.90kb
11:20:28 AM: .svelte-kit/output/client/_app/chunks/interface-7cbd6fac.js 58.70kb / brotli: 15.64kb
11:20:28 AM: .svelte-kit/output/client/_app/chunks/index-5ce1f98f.js 55.05kb / brotli: 14.55kb
11:20:28 AM: .svelte-kit/output/client/_app/chunks/index-aca34c49.js 60.44kb / brotli: 10.14kb
11:20:29 AM: .svelte-kit/output/client/_app/chunks/browser-4ed2a7c8.js 32.83kb / brotli: 8.27kb
11:20:29 AM: .svelte-kit/output/client/_app/chunks/index-9cfe6677.js 8.73kb / brotli: 2.77kb
11:20:29 AM: .svelte-kit/output/client/_app/chunks/index-4444af31.js 2.74kb / brotli: 0.96kb
11:20:29 AM: .svelte-kit/output/client/_app/assets/vendor-83544678.css 0.45kb / brotli: 0.18kb
11:20:29 AM: .svelte-kit/output/client/_app/assets/start-a8cd1609.css 0.16kb / brotli: 0.10kb
11:20:29 AM: .svelte-kit/output/client/_app/assets/pages/__layout.svelte-4cb48d76.css 4.93kb / brotli: 1.34kb
11:20:29 AM: .svelte-kit/output/client/_app/assets/pages/index.svelte-2d598d4a.css 5.08kb / brotli: 1.03kb
11:20:29 AM: .svelte-kit/output/client/_app/assets/Loading.svelte_svelte&type=style&lang-a699ca9e.css 8.90kb / brotli: 0.95kb
11:20:29 AM: .svelte-kit/output/client/_app/assets/pages/address/WalletStatBox.svelte-4f43c8ba.css 0.65kb / brotli: 0.20kb
11:20:29 AM: .svelte-kit/output/client/_app/assets/pages/address/[slug].svelte-f19d65af.css 0.79kb / brotli: 0.23kb
11:20:30 AM: .svelte-kit/output/client/_app/chunks/meetone-10714292-349acf15.js 29.06kb / brotli: 21.60kb
11:20:30 AM: .svelte-kit/output/client/_app/chunks/liquality-0adca826-15cb36e2.js 23.92kb / brotli: 16.28kb
11:20:30 AM: .svelte-kit/output/client/_app/chunks/index-d177709e-efadd65b.js 37.98kb / brotli: 20.54kb
11:20:30 AM: .svelte-kit/output/client/_app/chunks/index-455b013b.js 68.13kb / brotli: 16.59kb
11:20:30 AM: .svelte-kit/output/client/_app/chunks/index-a99a6fac.js 99.54kb / brotli: 28.33kb
11:20:30 AM: .svelte-kit/output/client/_app/chunks/index-5fa6de60.js 177.15kb / brotli: 42.13kb
11:20:30 AM: .svelte-kit/output/client/_app/chunks/keccak-45c05db5.js 169.83kb / brotli: 49.51kb
11:20:30 AM: .svelte-kit/output/client/_app/chunks/Eth-167bb677.js 476.64kb / brotli: 219.57kb
11:20:31 AM: .svelte-kit/output/client/_app/chunks/index-df9f7fa6.js 312.90kb / brotli: 80.77kb
11:20:31 AM: .svelte-kit/output/client/_app/chunks/cobovault-96d5b2b8-21d9fa23.js 430.60kb / brotli: 107.92kb
11:20:31 AM: .svelte-kit/output/client/_app/chunks/index-71d6af5a.js 473.12kb / brotli: 137.22kb
11:20:31 AM: .svelte-kit/output/client/_app/chunks/vendor-38f99971.js 839.96kb / brotli: skipped (large chunk)
11:20:31 AM: .svelte-kit/output/client/_app/chunks/index-248cdd94.js 823.55kb / brotli: skipped (large chunk)
11:20:31 AM: .svelte-kit/output/client/_app/chunks/torus.cjs-177013d3.js 720.84kb / brotli: skipped (large chunk)
11:20:31 AM: .svelte-kit/output/client/_app/chunks/index-7d5a63f0.js 1769.43kb / brotli: skipped (large chunk)
11:20:31 AM:
11:20:31 AM: (!) Some chunks are larger than 500kb after minification. Consider:
11:20:31 AM: - Using dynamic import() to code-split the application
11:20:31 AM: - Use build.rollupOptions.output.manualChunks to improve chunking: rollup.js
11:20:31 AM: - Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
11:20:31 AM: vite v2.3.7 building SSR bundle for production…
11:20:31 AM: transforming…
11:20:35 AM: ✓ 845 modules transformed.
11:20:37 AM: rendering chunks…
11:20:37 AM: .svelte-kit/output/server/app.js 954.55kb
11:20:37 AM: Run npm run preview to preview your production build locally.
11:20:37 AM:
11:20:37 AM: > Using @sveltejs/adapter-netlify
11:20:41 AM: [2021-07-03T16:20:41.889Z] @firebase/app:
11:20:41 AM: Warning: This is a browser-targeted Firebase bundle but it appears it is being
11:20:41 AM: run in a Node environment. If running in a Node environment, make sure you
11:20:41 AM: are using the bundle specified by the “main” field in package.json.
11:20:41 AM: If you are using Webpack, you can specify “main” as the first item in
11:20:41 AM: “resolve.mainFields”:
11:20:41 AM: Resolve | webpack
11:20:41 AM: If using Rollup, use the @rollup/plugin-node-resolve plugin and specify “main”
11:20:41 AM: as the first item in “mainFields”, e.g. [‘main’, ‘module’].
11:20:41 AM: https://github.com/rollup/@rollup/plugin-node-resolve
11:20:41 AM: > The XMLHttpRequest compatibility library was not found.
11:20:41 AM: {
11:20:41 AM: has: [ 90 ],
11:20:41 AM: keys: [ { open: ‘\x1B[90m’, close: ‘\x1B[39m’, rgx: /\x1b[39m/g } ],
11:20:41 AM: reset: [Function: bound ],
11:20:41 AM: bold: [Function: bound ],
11:20:41 AM: dim: [Function: bound ],
11:20:41 AM: italic: [Function: bound ],
11:20:41 AM: underline: [Function: bound ],
11:20:41 AM: inverse: [Function: bound ],
11:20:41 AM: hidden: [Function: bound ],
11:20:41 AM: strikethrough: [Function: bound ],
11:20:41 AM: black: [Function: bound ],
11:20:41 AM: red: [Function: bound ],
11:20:41 AM: green: [Function: bound ],
11:20:41 AM: yellow: [Function: bound ],
11:20:41 AM: blue: [Function: bound ],
11:20:41 AM: magenta: [Function: bound ],
11:20:41 AM: cyan: [Function: bound ],
11:20:41 AM: white: [Function: bound ],
11:20:41 AM: gray: [Function: bound ],
11:20:41 AM: grey: [Function: bound ],
11:20:41 AM: bgBlack: [Function: bound ],
11:20:41 AM: bgRed: [Function: bound ],
11:20:41 AM: bgGreen: [Function: bound ],
11:20:41 AM: bgYellow: [Function: bound ],
11:20:41 AM: bgBlue: [Function: bound ],
11:20:41 AM: bgMagenta: [Function: bound ],
11:20:41 AM: bgCyan: [Function: bound ],
11:20:41 AM: bgWhite: [Function: bound ]
11:20:41 AM: }
11:20:42 AM: Creating deploy upload records
11:20:42 AM: npm ERR! code ELIFECYCLE
11:20:42 AM: npm ERR! errno 1
11:20:42 AM: npm ERR! plug.cool@0.0.1 build: svelte-kit build
11:20:42 AM: npm ERR! Exit status 1
11:20:42 AM: npm ERR!
11:20:42 AM: npm ERR! Failed at the plug.cool@0.0.1 build script.
11:20:42 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
11:20:42 AM: npm ERR! A complete log of this run can be found in:
11:20:42 AM: npm ERR! /opt/buildhome/.npm/_logs/2021-07-03T16_20_42_247Z-debug.log
11:20:43 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2
11:20:42 AM: ​
11:20:42 AM: ────────────────────────────────────────────────────────────────
11:20:42 AM: “build.command” failed
11:20:42 AM: ────────────────────────────────────────────────────────────────
11:20:42 AM: ​
11:20:42 AM: Error message
11:20:42 AM: Command failed with exit code 1: npm run build
11:20:42 AM: ​
11:20:42 AM: Error location
11:20:42 AM: In build.command from netlify.toml:
11:20:42 AM: npm run build
11:20:42 AM: ​
11:20:42 AM: Resolved config
11:20:42 AM: build:
11:20:42 AM: command: npm run build
11:20:42 AM: commandOrigin: config
11:20:42 AM: environment:
11:20:42 AM: - NODE_VERSION
11:20:42 AM: - VITE_COINCODEX_BASE_URL
11:20:42 AM: - VITE_FB_API_KEY
11:20:42 AM: - VITE_FB_APP_ID
11:20:42 AM: - VITE_FB_AUTH_DOMAIN
11:20:42 AM: - VITE_FB_DATABASE_URL
11:20:42 AM: - VITE_FB_MEASUREMENT_ID
11:20:42 AM: - VITE_FB_MESSAGING_SENDER_ID
11:20:42 AM: - VITE_FB_PROJECT_ID
11:20:42 AM: - VITE_FB_STORAGE_BUCKET
11:20:42 AM: - VITE_MESSARI_BASE_URL
11:20:42 AM: - VITE_MP_SERVER_BASE
11:20:42 AM: - VITE_ONBOARD_DAPP_ID
11:20:42 AM: - VITE_ZAPPER_API_KEY
11:20:42 AM: - VITE_ZAPPER_BASE_URL
11:20:42 AM: publish: /opt/build/repo/build
11:20:42 AM: publishOrigin: config
11:20:42 AM: functions:
11:20:42 AM: ‘*’: {}
11:20:42 AM: functionsDirectory: /opt/build/repo/functions
11:20:42 AM: Caching artifacts
11:20:42 AM: Started saving node modules
11:20:42 AM: Finished saving node modules
11:20:42 AM: Started saving build plugins
11:20:42 AM: Finished saving build plugins
11:20:42 AM: Started saving pip cache
11:20:42 AM: Finished saving pip cache
11:20:42 AM: Started saving emacs cask dependencies
11:20:42 AM: Finished saving emacs cask dependencies
11:20:42 AM: Started saving maven dependencies
11:20:42 AM: Finished saving maven dependencies
11:20:42 AM: Started saving boot dependencies
11:20:42 AM: Finished saving boot dependencies
11:20:42 AM: Started saving rust rustup cache
11:20:42 AM: Finished saving rust rustup cache
11:20:42 AM: Started saving go dependencies
11:20:42 AM: Finished saving go dependencies
11:20:42 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:20:43 AM: Failing build: Failed to build site
11:20:43 AM: Finished processing build request in 2m59.806031495s

Build Settings Screenshot:

Screen Shot 2021-07-03 at 11.49.42 AM

Any help greatly appreciated!

Hey there, @samm! Welcome to the Netlify Forums :netliconfetti:

It looks like this thread has been a bit quiet since you posted last week, thanks for your patience. Are you still experiencing this obstacle? If so, let us know what additional debugging steps you have taken since you wrote in and we will take a look!

Hi @hillary thanks for checking in.

I didn’t find a solution for this, I think it has to do with the netlify-svelte-adapter. I ended up working on a non-Svelte build as this was an issue I couldn’t get past.

Hey there! Sorry to hear this.

Can’t say I’m too well versed with Svelte but, for posterity, there’s always the adapter’s repo to share use cases and issues plus some potentially useful example repos in the wild!

It seems I’m bumping into exactly the same problem, may I know how you worked with the non-svelte build? Thank you!

Hi there, @hk7math :wave:

It looks like this thread has been a bit quiet since you posted. Are you still encountering issues? If so, can you please share the following:

  • your site name
  • your repo
  • your most recent build log
  • any troubleshooting steps you have taken

Thank you Hillary=) After upgrading to Firebase modular version v9.0, the problem is resolved.

1 Like

That is great to hear! I am glad everything is working for you :netliconfetti: