netlify builder seems to fail consistently with missing function
See original GitHub issueDescribe the bug
Trying to deploy to Netlify, and seeing the following error on every build:
4:35:04 PM: > Using @sveltejs/adapter-netlify 4:35:04 PM: error during build: 4:35:04 PM: TypeError: builder.getAppPath is not a function 4:35:04 PM: at adapt (file:///opt/build/repo/node_modules/@sveltejs/adapter-netlify/index.js:67:21) 4:35:04 PM: at adapt (file:///opt/build/repo/node_modules/@sveltejs/kit/src/core/adapt/index.js:16:8) 4:35:04 PM: at Object.closeBundle (file:///opt/build/repo/node_modules/@sveltejs/kit/src/vite/index.js:460:11) 4:35:04 PM: at async Promise.all (index 0) 4:35:04 PM: at async Object.close (file:///opt/build/repo/node_modules/rollup/dist/es/shared/rollup.js:23662:13) 4:35:04 PM: at async Promise.all (index 0) 4:35:04 PM: at async build (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-0fc8e132.js:43473:13) 4:35:04 PM: at async CAC.<anonymous> (file:///opt/build/repo/node_modules/vite/dist/node/cli.js:747:9)
Reproduction
Using Node 16.16, try and deploy a svelte application to Netlify using this adapter.
Logs
4:34:10 PM: Build ready to start
4:34:19 PM: build-image version: 9289b698a503f132b265bd089ab40ce1d6f9e65e (focal)
4:34:19 PM: build-image tag: v4.12.0
4:34:19 PM: buildbot version: 2510ae842d7cc96532da2c05a74ba836f3e7f056
4:34:19 PM: Fetching cached dependencies
4:34:19 PM: Failed to fetch cache, continuing with build
4:34:19 PM: Starting to prepare the repo for build
4:34:20 PM: No cached dependencies found. Cloning fresh repo
4:34:20 PM: git clone https://github.com/Cardtech-io/moonstoned
4:34:21 PM: Preparing Git Reference refs/heads/master
4:34:21 PM: Parsing package.json dependencies
4:34:22 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'build' versus '.svelte-kit' in the Netlify UI
4:34:22 PM: Starting build script
4:34:22 PM: Installing dependencies
4:34:22 PM: Python version set to 2.7
4:34:23 PM: Attempting node version '18.7' from .nvmrc
4:34:23 PM: Downloading and installing node v18.7.0...
4:34:23 PM: Downloading https://nodejs.org/dist/v18.7.0/node-v18.7.0-linux-x64.tar.xz...
4:34:23 PM: Computing checksum with sha256sum
4:34:23 PM: Checksums matched!
4:34:25 PM: Now using node v18.7.0 (npm v8.15.0)
4:34:25 PM: Started restoring cached build plugins
4:34:25 PM: Finished restoring cached build plugins
4:34:25 PM: Attempting ruby version 2.7.2, read from environment
4:34:26 PM: Using ruby version 2.7.2
4:34:26 PM: Using PHP version 8.0
4:34:27 PM: No npm workspaces detected
4:34:27 PM: Started restoring cached node modules
4:34:27 PM: Finished restoring cached node modules
4:34:27 PM: Installing NPM modules using NPM version 8.15.0
4:34:27 PM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
4:34:27 PM: npm WARN config location in the cache, and they are managed by
4:34:27 PM: npm WARN config [`cacache`](http://npm.im/cacache).
4:34:27 PM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
4:34:27 PM: npm WARN config location in the cache, and they are managed by
4:34:27 PM: npm WARN config [`cacache`](http://npm.im/cacache).
4:34:29 PM: npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
4:34:35 PM: added 456 packages, and audited 457 packages in 7s
4:34:35 PM: 70 packages are looking for funding
4:34:35 PM: run `npm fund` for details
4:34:35 PM: 4 vulnerabilities (3 low, 1 high)
4:34:35 PM: To address all issues (including breaking changes), run:
4:34:35 PM: npm audit fix --force
4:34:35 PM: Run `npm audit` for details.
4:34:35 PM: NPM modules installed
4:34:35 PM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
4:34:35 PM: npm WARN config location in the cache, and they are managed by
4:34:35 PM: npm WARN config [`cacache`](http://npm.im/cacache).
4:34:35 PM: Started restoring cached go cache
4:34:35 PM: Finished restoring cached go cache
4:34:35 PM: Installing Go version 1.17 (requested 1.17)
4:34:39 PM: unset GOOS;
4:34:39 PM: unset GOARCH;
4:34:39 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.17.linux.amd64';
4:34:39 PM: export PATH="/opt/buildhome/.gimme/versions/go1.17.linux.amd64/bin:${PATH}";
4:34:39 PM: go version >&2;
4:34:39 PM: export GIMME_ENV="/opt/buildhome/.gimme/env/go1.17.linux.amd64.env"
4:34:39 PM: go version go1.17 linux/amd64
4:34:39 PM: Installing missing commands
4:34:39 PM: Verify run directory
4:34:40 PM: β
4:34:40 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
4:34:40 PM: Netlify Build
4:34:40 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
4:34:40 PM: β
4:34:40 PM: β― Version
4:34:40 PM: @netlify/build 27.20.6
4:34:40 PM: β
4:34:40 PM: β― Flags
4:34:40 PM: baseRelDir: true
4:34:40 PM: buildId: 634ce9529385500009f7f4b1
4:34:40 PM: deployId: 634ce9529385500009f7f4b3
4:34:40 PM: β
4:34:40 PM: β― Current directory
4:34:40 PM: /opt/build/repo
4:34:40 PM: β
4:34:40 PM: β― Config file
4:34:40 PM: /opt/build/repo/netlify.toml
4:34:40 PM: β
4:34:40 PM: β― Context
4:34:40 PM: production
4:34:40 PM: β
4:34:40 PM: β― Installing plugins
4:34:40 PM: - @netlify/plugin-lighthouse@4.0.1
4:34:53 PM: β
4:34:53 PM: β― Loading plugins
4:34:53 PM: - @netlify/plugin-lighthouse@4.0.1 from netlify.toml
4:34:54 PM: β
4:34:54 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
4:34:54 PM: 1. build.command from netlify.toml
4:34:54 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
4:34:54 PM: β
4:34:54 PM: $ npm run build
4:34:55 PM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
4:34:55 PM: npm WARN config location in the cache, and they are managed by
4:34:55 PM: npm WARN config [`cacache`](http://npm.im/cacache).
4:34:55 PM: > conquest@0.0.1 build
4:34:55 PM: > vite build
4:34:55 PM: vite v3.0.9 building for production...
4:34:55 PM: transforming...
4:34:56 PM: 5:34:56 AM [vite-plugin-svelte] /opt/build/repo/src/components/Notice.svelte:5:15 Notice has unused export property 'type'. If it is for external reference only, please consider using `export const type`
4:34:56 PM: 3: </div>
4:34:56 PM: 4: <script>
4:34:56 PM: 5: export let type = 'info'
4:34:56 PM: ^
4:34:56 PM: 6: </script>
4:34:57 PM: warn - The `purge`/`content` options have changed in Tailwind CSS v3.0.
4:34:57 PM: warn - Update your configuration file to eliminate this warning.
4:34:57 PM: warn - https://tailwindcss.com/docs/upgrade-guide#configure-content-sources
4:35:02 PM: β 660 modules transformed.
4:35:03 PM: rendering chunks...
4:35:03 PM: .svelte-kit/output/client/vite-manifest.json 7.11 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/components/error.svelte-0dffdb99.js 1.97 KiB / gzip: 0.91 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/components/pages/_page.svelte-6bc693c4.js 2.50 KiB / gzip: 1.31 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/modules/pages/_layout.ts-85600901.js 0.07 KiB / gzip: 0.08 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/components/pages/_layout.svelte-d14fe969.js 15.40 KiB / gzip: 4.94 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/modules/pages/build/_troupe_/_page.ts-44dc495c.js 0.21 KiB / gzip: 0.14 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/chunks/singletons-e5e57fbd.js 0.05 KiB / gzip: 0.07 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/components/pages/build/_page.svelte-2caa3df4.js 10.63 KiB / gzip: 4.07 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/start-16f09a2b.js 22.78 KiB / gzip: 8.56 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/chunks/env-public-bcceb984.js 0.04 KiB / gzip: 0.06 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/components/pages/build/_troupe_/_page.svelte-a76b5bcd.js 12.77 KiB / gzip: 4.29 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/chunks/index-51f38649.js 0.43 KiB / gzip: 0.30 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/chunks/index-d6fabef0.js 0.25 KiB / gzip: 0.17 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/chunks/card-768ab1b3.js 0.07 KiB / gzip: 0.08 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/chunks/Icon-7468046b.js 1.42 KiB / gzip: 0.79 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/chunks/navigation-713fde84.js 0.19 KiB / gzip: 0.16 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/chunks/index-2be3f5f2.js 11.37 KiB / gzip: 4.76 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/chunks/_layout-abf91a35.js 0.14 KiB / gzip: 0.14 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/chunks/_commonjsHelpers-e864563f.js 0.23 KiB / gzip: 0.17 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/chunks/_page-29cf5e9b.js 0.34 KiB / gzip: 0.27 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/chunks/Notice-24e55d97.js 1.88 KiB / gzip: 0.95 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/chunks/0-a9b2f7ff.js 0.32 KiB / gzip: 0.20 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/chunks/1-c9cff04f.js 0.11 KiB / gzip: 0.11 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/chunks/2-3d4970af.js 0.28 KiB / gzip: 0.19 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/chunks/3-bcbd931d.js 0.31 KiB / gzip: 0.21 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/chunks/4-c36306de.js 0.45 KiB / gzip: 0.26 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/assets/+layout-7f599181.css 12.47 KiB / gzip: 3.29 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/chunks/characters-13d26086.js 26.09 KiB / gzip: 7.93 KiB
4:35:03 PM: .svelte-kit/output/client/_app/immutable/chunks/db-85ee41d8.js 334.22 KiB / gzip: 103.91 KiB
4:35:03 PM: vite v3.0.9 building SSR bundle for production...
4:35:03 PM: transforming...
4:35:03 PM: 5:35:03 AM [vite-plugin-svelte] /opt/build/repo/src/components/Notice.svelte:5:15 Notice has unused export property 'type'. If it is for external reference only, please consider using `export const type`
4:35:03 PM: 3: </div>
4:35:03 PM: 4: <script>
4:35:03 PM: 5: export let type = 'info'
4:35:03 PM: ^
4:35:03 PM: 6: </script>
4:35:04 PM: β 62 modules transformed.
4:35:04 PM: rendering chunks...
4:35:04 PM: .svelte-kit/output/server/vite-manifest.json 2.87 KiB
4:35:04 PM: .svelte-kit/output/server/index.js 75.53 KiB
4:35:04 PM: .svelte-kit/output/server/entries/pages/_layout.svelte.js 7.87 KiB
4:35:04 PM: .svelte-kit/output/server/entries/pages/_layout.ts.js 0.05 KiB
4:35:04 PM: .svelte-kit/output/server/entries/fallbacks/error.svelte.js 1.65 KiB
4:35:04 PM: .svelte-kit/output/server/entries/pages/_page.svelte.js 1.16 KiB
4:35:04 PM: .svelte-kit/output/server/entries/pages/build/_page.svelte.js 3.38 KiB
4:35:04 PM: .svelte-kit/output/server/entries/pages/build/_troupe_/_page.svelte.js 3.58 KiB
4:35:04 PM: .svelte-kit/output/server/entries/pages/build/_troupe_/_page.ts.js 0.46 KiB
4:35:04 PM: .svelte-kit/output/server/chunks/env-public.js 0.20 KiB
4:35:04 PM: .svelte-kit/output/server/chunks/index.js 3.99 KiB
4:35:04 PM: .svelte-kit/output/server/chunks/index2.js 1.56 KiB
4:35:04 PM: .svelte-kit/output/server/chunks/index3.js 1.89 KiB
4:35:04 PM: .svelte-kit/output/server/chunks/card.js 0.10 KiB
4:35:04 PM: .svelte-kit/output/server/chunks/Icon.js 0.44 KiB
4:35:04 PM: .svelte-kit/output/server/chunks/characters.js 20.83 KiB
4:35:04 PM: .svelte-kit/output/server/chunks/db.js 1.27 KiB
4:35:04 PM: .svelte-kit/output/server/chunks/Notice.js 0.47 KiB
4:35:04 PM: .svelte-kit/output/server/chunks/hooks.js 0.10 KiB
4:35:04 PM: Run npm run preview to preview your production build locally.
4:35:04 PM:
4:35:04 PM: > Using @sveltejs/adapter-netlify
4:35:04 PM: error during build:
4:35:04 PM: TypeError: builder.getAppPath is not a function
4:35:04 PM: at adapt (file:///opt/build/repo/node_modules/@sveltejs/adapter-netlify/index.js:67:21)
4:35:04 PM: at adapt (file:///opt/build/repo/node_modules/@sveltejs/kit/src/core/adapt/index.js:16:8)
4:35:04 PM: at Object.closeBundle (file:///opt/build/repo/node_modules/@sveltejs/kit/src/vite/index.js:460:11)
4:35:04 PM: at async Promise.all (index 0)
4:35:04 PM: at async Object.close (file:///opt/build/repo/node_modules/rollup/dist/es/shared/rollup.js:23662:13)
4:35:04 PM: at async Promise.all (index 0)
4:35:04 PM: at async build (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-0fc8e132.js:43473:13)
4:35:04 PM: at async CAC.<anonymous> (file:///opt/build/repo/node_modules/vite/dist/node/cli.js:747:9)
4:35:04 PM: β
4:35:04 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
4:35:04 PM: "build.command" failed
4:35:04 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
4:35:04 PM: β
4:35:04 PM: Error message
4:35:04 PM: Command failed with exit code 1: npm run build (https://ntl.fyi/exit-code-1)
4:35:04 PM: β
4:35:04 PM: Error location
4:35:04 PM: In build.command from netlify.toml:
4:35:04 PM: npm run build
4:35:04 PM: β
4:35:04 PM: Resolved config
4:35:04 PM: build:
4:35:04 PM: command: npm run build
4:35:04 PM: commandOrigin: config
4:35:04 PM: environment:
4:35:04 PM: - NODE_VERSION
4:35:04 PM: publish: /opt/build/repo/build
4:35:04 PM: publishOrigin: config
4:35:04 PM: headers:
4:35:04 PM: - for: /* values: Content-Security-Policy: frame-ancestors https://www.facebook.com X-Frame-Options: DENY X-XSS-Protection: 1; mode=block headersOrigin: config plugins: - inputs: {} origin: config package: '@netlify/plugin-lighthouse'Caching artifacts
4:35:04 PM: Started saving node modules
4:35:04 PM: Finished saving node modules
4:35:04 PM: Started saving build plugins
4:35:04 PM: Finished saving build plugins
4:35:04 PM: Started saving pip cache
4:35:04 PM: Finished saving pip cache
4:35:04 PM: Started saving emacs cask dependencies
4:35:04 PM: Finished saving emacs cask dependencies
4:35:04 PM: Started saving maven dependencies
4:35:04 PM: Finished saving maven dependencies
4:35:04 PM: Started saving boot dependencies
4:35:04 PM: Finished saving boot dependencies
4:35:04 PM: Started saving rust rustup cache
4:35:04 PM: Finished saving rust rustup cache
4:35:04 PM: Started saving go dependencies
4:35:04 PM: Finished saving go dependencies
4:35:06 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
4:35:06 PM: Creating deploy upload records
4:35:06 PM: Failing build: Failed to build site
4:35:06 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
4:35:06 PM: Finished processing build request in 46.943251012s
System Info
Tried on both node 16.16 and node 18.7.0 both have the exact same problem.
Severity
blocking all usage of SvelteKit
Additional Information
Canβt deploy at all to production currently.
Note that this -is- a new project, but itβs holding up our ability to deploy the solution. It seems like an oversight of the library, but not really sure tbh.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
You are probably on SvelteKit version that doesnβt contain this new method yet. If you bump your adapter, you also need to bump Kit.
i solved it by updating my packages with βnpm updateβ.