New Vite requirements gives warning when building "for the first time"
Describe the bug
Hi,
If I'm not mistaken since the new build changes introduced in PR #5332 I'm getting this error when building:
[WARNING] Cannot find base config file "./.svelte-kit/tsconfig.json" [tsconfig.json]
tsconfig.json:2:12:
2 │ "extends": "./.svelte-kit/tsconfig.json",
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Now this is quite logical because the .svelte-kit folder is in my (and this repos) .gitignore. The folder (and the tsconfig.json file) does get generated after running once, but that isn't a solution since you'd generally build in a CI/CD pipeline.
I don't know if this is a problem or not, but thought it would be better to report it in any case.
Thanks for the amazing work you all have done! :)
Reproduction
My project where this is happening: link Logs of a CI/CD step where you can see this: link
If you want to recreate it using my repo here are the steps:
- Clone my repo
- run
npm install - run
npm run build
Logs
Relevant part:
Step 7/9 : RUN npm run build
---> Running in bef9c63132b9
> [email protected] build
> vite build
▲ [WARNING] Cannot find base config file "./.svelte-kit/tsconfig.json" [tsconfig.json]
tsconfig.json:2:12:
2 │ "extends": "./.svelte-kit/tsconfig.json",
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
System Info
npmPackages:
@sveltejs/adapter-auto: next => 1.0.0-next.53
@sveltejs/adapter-static: ^1.0.0-next.34 => 1.0.0-next.34
@sveltejs/kit: next => 1.0.0-next.360
svelte: ^3.44.0 => 3.48.0
vite: ^2.9.13 => 2.9.13
Severity
annoyance
Additional Information
My package.json file:
{
"name": "personal-website",
"version": "0.0.1",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"package": "svelte-kit package",
"preview": "vite preview",
"prepare": "svelte-kit sync",
"test": "playwright test",
"check": "svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check --plugin-search-dir=. . && eslint .",
"format": "prettier --write --plugin-search-dir=. ."
},
"devDependencies": {
"@playwright/test": "^1.22.2",
"@sveltejs/adapter-auto": "next",
"@sveltejs/adapter-static": "^1.0.0-next.34",
"@sveltejs/kit": "next",
"@typescript-eslint/eslint-plugin": "^5.27.0",
"@typescript-eslint/parser": "^5.27.0",
"bootstrap": "^5.1.3",
"eslint": "^8.16.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-svelte3": "^4.0.0",
"prettier": "^2.6.2",
"prettier-plugin-svelte": "^2.7.0",
"sass": "^1.49.11",
"svelte": "^3.44.0",
"svelte-check": "^2.7.1",
"svelte-preprocess": "^4.10.5",
"tslib": "^2.3.1",
"typescript": "^4.7.2",
"vite": "^2.9.13"
},
"type": "module"
}
I have the same error and build fails on Netlify.
Make sure you have the following line in your package.json. It will create the file when you run npm install.
"prepare": "svelte-kit sync",
Make sure you have the following line in your
package.json. It will create the file when you runnpm install."prepare": "svelte-kit sync",
It's there. I've updated this issue with my entire package.json file just to be sure.
I just ran the following commands and didn't see any issue:
git clone https://gitlab.com/uranderu/personal-website.git
cd personal-website/
npm install
npm run build
@phenomen this wouldn't fail the build, you're experiencing a different error in addition to this (harmless) warning
I have same issues with new Vite requirements, my console prompts an error about hydration:
root.svelte? [sm]:50
Uncaught (in promise) Error: options.hydrate only works if the component was compiled with the `hydratable: true` option
I don't know where to set hydratable to true.
This is my current svelte.config.js:
import adapter from '@sveltejs/adapter-static';
import * as fs from 'fs';
const pkg = JSON.parse(fs.readFileSync('./package.json'));
import preprocess from 'svelte-preprocess';
import { fileURLToPath } from 'url';
import { dirname } from 'path';
const filePath = dirname(fileURLToPath(import.meta.url));
const scssPath = `${filePath}/src/lib/styles/`;
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: preprocess({
scss: {
sourceMap: true,
prependData: `@import '${scssPath}localmixins.scss';`
}
}),
vite: {
adapter: adapter(),
browser:{
hydrate: true
},
config: {
ssr: {
noExternal: Object.keys(pkg.dependencies || {}),
},
build: {
minify: true
}
},
files: {
lib: 'src/lib'
},
prerender: {
default: true,
crawl: true,
onError: 'continue',
enabled: true,
entries: ['*']
}
}
};
export default config;
And my vite.config.js:
import { sveltekit } from '@sveltejs/kit/vite';
/** @type {import('vite').UserConfig} */
const config = {
plugins: [sveltekit()]
};
export default config;
Tried to build a new project and see the changes but it must be something about my code, probably some of you can point me in the right direction.
Thanks in advance.
@raccodee your issue is unrelated to this one. Please ask help questions on Discord
This needs to live in your vite.config.js:
ssr: {
noExternal: Object.keys(pkg.dependencies || {}),
},
build: {
minify: true
}
The vite key should be removed from svelte.config.js and everything else within it should live directly in the config object without any intermediate keys
I just ran the following commands and didn't see any issue:
git clone https://gitlab.com/uranderu/personal-website.git cd personal-website/ npm install npm run build
Hi, I've done some testing and I'm getting the same results as you. Indeed after running npm install I'm getting the .svelte-kit folder and then the error is gone when building. In my initial test on my PC I removed all the generated folders/files including the .svelte-kit folder which explains the error.
However, I'm still getting these issues on Gitlab CI/CD but I think that is an issue with them since I'm not getting these errors when running the dockerfile locally on my machine. And since @Rich-Harris said it is a harmless warning (and I'm not seeing any problems) I'm fine with it. Thank you for your help!
Edit: I've found out what caused the issue on Gitlab CI/CD. I didn't copy the "svelte.config.js" file before I ran "npm install" which ran "svelte-kit sync". I'm not going to clarify my weird (and now changed) Dockerfile but I wanted to update this comment since I accused Gitlab CI/CD.
And since @Rich-Harris said it is a harmless warning
Can you link to this please?
@phenomen this wouldn't fail the build, you're experiencing a different error in addition to this (harmless) warning
There you go, it's in one of the comments marked off-topic above.
@phenomen this wouldn't fail the build, you're experiencing a different error in addition to this (harmless) warning
There you go, it's in one of the comments marked off-topic above.
Wow ok. Thanks I completely missed that... which would be the effect of hiding things in issue threads. It seems anti productive. Just because it's off topic doesn't mean it's irrelevant.
Trying to migrate a project from 5 months ago ...
Created a new project
npm create vite@latest
Select SvelteKit and TypeScript
Try to run the project
[WARNING] Cannot find base config file "./.svelte-kit/tsconfig.json" [tsconfig.json]
tsconfig.json:2:12:
2 │ "extends": "./.svelte-kit/tsconfig.json",
Getting a little sick of the constant breaking changes on SvelteKit.
Trying to migrate a project from 5 months ago ...
Created a new project
npm create vite@latestSelect SvelteKit and TypeScript
Try to run the project
[WARNING] Cannot find base config file "./.svelte-kit/tsconfig.json" [tsconfig.json] tsconfig.json:2:12: 2 │ "extends": "./.svelte-kit/tsconfig.json",
Normally this gets generated automatically on the first startup. Maybe try the official way to create a project? npm create svelte@latest my-app
Getting a little sick of the constant breaking changes on SvelteKit.
Five months ago SvelteKit was still in beta, so breaking changes were a possibility. Nevertheless, they warned people that breaking changes will occur. If I'm not mistaken it was right at the top of the README.
when I am on @svektejs/kit 1.13 or 1.14 I get build fail on netlify. Going back to @sveltejs/kit 1.5.0 fixes the issue.
3:16:40 PM: build-image version: 099264affa13d33ffbaea4ccf963ddbead423c30 (focal)
3:16:40 PM: buildbot version: 099264affa13d33ffbaea4ccf963ddbead423c30
3:16:40 PM: Fetching cached dependencies
3:16:40 PM: Starting to download cache of 802.2MB
3:16:42 PM: Finished downloading cache in 2.101s
3:16:42 PM: Starting to extract cache
3:16:47 PM: Finished extracting cache in 4.831s
3:16:47 PM: Finished fetching cache in 7.017s
3:16:47 PM: Starting to prepare the repo for build
3:16:48 PM: Preparing Git Reference refs/heads/storybook
3:16:48 PM: Parsing package.json dependencies
3:16:50 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'storybook-static' versus '' in the Netlify UI
3:16:50 PM: Different build command detected, going to use the one specified in the Netlify configuration file: 'yarn build-storybook' versus '' in the Netlify UI
3:16:50 PM: Starting build script
3:16:50 PM: Installing dependencies
3:16:50 PM: Python version set to 2.7
3:16:50 PM: Started restoring cached Node.js version
3:16:51 PM: Finished restoring cached Node.js version
3:16:51 PM: Attempting Node.js version '18' from .nvmrc
3:16:51 PM: v18.15.0 is already installed.
3:16:52 PM: Now using node v18.15.0 (npm v9.5.0)
3:16:52 PM: Enabling Node.js Corepack
3:16:52 PM: Started restoring cached build plugins
3:16:52 PM: Finished restoring cached build plugins
3:16:52 PM: Attempting Ruby version 2.7.2, read from environment
3:16:54 PM: Using Ruby version 2.7.2
3:16:54 PM: Using PHP version 8.0
3:16:54 PM: Started restoring cached corepack dependencies
3:16:54 PM: Finished restoring cached corepack dependencies
3:16:54 PM: Started restoring cached yarn cache
3:16:59 PM: Finished restoring cached yarn cache
3:16:59 PM: No yarn workspaces detected
3:16:59 PM: Started restoring cached node modules
3:16:59 PM: Finished restoring cached node modules
3:17:00 PM: Installing npm packages using Yarn version 1.22.19
3:17:00 PM: yarn install v1.22.19
3:17:00 PM: [1/4] Resolving packages...
3:17:00 PM: [2/4] Fetching packages...
3:17:01 PM: [3/4] Linking dependencies...
3:17:01 PM: warning " > @storybook/[email protected]" has unmet peer dependency "@storybook/theming@^7.0.0-beta".
3:17:03 PM: [4/4] Building fresh packages...
3:17:03 PM: Done in 2.95s.
3:17:03 PM: npm packages installed using Yarn
3:17:03 PM: Started restoring cached go cache
3:17:03 PM: Finished restoring cached go cache
3:17:03 PM: go version go1.19.7 linux/amd64
3:17:04 PM: Detected 1 framework(s)
3:17:04 PM: "svelte-kit" at version "1.14.0"
3:17:04 PM: Section completed: initializing
3:17:05 PM:
3:17:05 PM: Netlify Build
3:17:05 PM: ────────────────────────────────────────────────────────────────
3:17:05 PM:
3:17:05 PM: ❯ Version
3:17:05 PM: @netlify/build 29.7.1
3:17:05 PM:
3:17:05 PM: ❯ Flags
3:17:05 PM: baseRelDir: true
3:17:05 PM: buildId: 642134bf4b4365000815d634
3:17:05 PM: deployId: 642134bf4b4365000815d636
3:17:05 PM:
3:17:05 PM: ❯ Current directory
3:17:05 PM: /opt/build/repo
3:17:05 PM:
3:17:05 PM: ❯ Config file
3:17:05 PM: /opt/build/repo/netlify.toml
3:17:05 PM:
3:17:05 PM: ❯ Context
3:17:05 PM: production
3:17:05 PM:
3:17:05 PM: 1. build.command from netlify.toml
3:17:05 PM: ────────────────────────────────────────────────────────────────
3:17:05 PM:
3:17:05 PM: $ yarn build-storybook
3:17:05 PM: yarn run v1.22.19
3:17:05 PM: $ storybook build --disable-telemetry
3:17:06 PM: @storybook/cli v7.0.0-rc.8
3:17:06 PM:
3:17:06 PM: info => Cleaning outputDir: /storybook-static
3:17:06 PM: info => Loading presets
3:17:07 PM: info => Building manager..
3:17:08 PM: info => Manager built (164 ms)
3:17:08 PM: info => Copying static files: /opt/build/repo/node_modules/@storybook/manager/static at /opt/build/repo/storybook-static/sb-common-assets
3:17:08 PM: ▲ [WARNING] Cannot find base config file "./.svelte-kit/tsconfig.json" [tsconfig.json]
3:17:08 PM: tsconfig.json:2:13:
3:17:08 PM: 2 │ "extends": "./.svelte-kit/tsconfig.json",
3:17:08 PM: ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3:17:10 PM: WARN 🚨 Unable to index files:
3:17:10 PM: WARN - ./src/stories/Button.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: WARN - ./src/stories/Input.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: WARN - ./src/stories/Keypad.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: WARN - ./src/stories/Radio.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: WARN - ./src/stories/Switch.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: WARN - ./src/stories/components/Icons.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: WARN 🚨 Unable to index files:
3:17:10 PM: WARN - ./src/stories/Button.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: WARN - ./src/stories/Input.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: WARN - ./src/stories/Keypad.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: WARN - ./src/stories/Radio.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: WARN - ./src/stories/Switch.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: WARN - ./src/stories/components/Icons.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: ERR! Error: Unable to index files:
3:17:10 PM: ERR! - ./src/stories/Button.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: ERR! - ./src/stories/Input.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: ERR! - ./src/stories/Keypad.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: ERR! - ./src/stories/Radio.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: ERR! - ./src/stories/Switch.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: ERR! - ./src/stories/components/Icons.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: ERR! at StoryIndexGenerator.getIndex (/opt/build/repo/node_modules/@storybook/core-server/dist/index.js:17:3457)
3:17:10 PM: ERR! at async extractStoriesJson (/opt/build/repo/node_modules/@storybook/core-server/dist/index.js:10:4403)
3:17:10 PM: ERR! at async Promise.all (index 3)
3:17:10 PM: ERR! at async buildStaticStandalone (/opt/build/repo/node_modules/@storybook/core-server/dist/index.js:23:1840)
3:17:10 PM: ERR! at async withTelemetry (/opt/build/repo/node_modules/@storybook/core-server/dist/index.js:27:3469)
3:17:10 PM: ERR! at async build (/opt/build/repo/node_modules/@storybook/cli/dist/generate.js:439:1056)
3:17:10 PM: ERR! at async Command.<anonymous> (/opt/build/repo/node_modules/@storybook/cli/dist/generate.js:442:125)
3:17:10 PM: ERR! MultipleIndexingError: Unable to index files:
3:17:10 PM: ERR! - ./src/stories/Button.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: ERR! - ./src/stories/Input.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: ERR! - ./src/stories/Keypad.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: ERR! - ./src/stories/Radio.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: ERR! - ./src/stories/Switch.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: ERR! - ./src/stories/components/Icons.stories.svelte: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: ERR! at StoryIndexGenerator.getIndex (/opt/build/repo/node_modules/@storybook/core-server/dist/index.js:17:3457)
3:17:10 PM: ERR! at async extractStoriesJson (/opt/build/repo/node_modules/@storybook/core-server/dist/index.js:10:4403)
3:17:10 PM: ERR! at async Promise.all (index 3)
3:17:10 PM: ERR! at async buildStaticStandalone (/opt/build/repo/node_modules/@storybook/core-server/dist/index.js:23:1840)
3:17:10 PM: ERR! at async withTelemetry (/opt/build/repo/node_modules/@storybook/core-server/dist/index.js:27:3469)
3:17:10 PM: ERR! at async build (/opt/build/repo/node_modules/@storybook/cli/dist/generate.js:439:1056)
3:17:10 PM: ERR! at async Command.<anonymous> (/opt/build/repo/node_modules/@storybook/cli/dist/generate.js:442:125) {
3:17:10 PM: ERR! indexingErrors: [
3:17:10 PM: ERR! TSConfckParseError: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: ERR! at resolveExtends (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13299:9)
3:17:10 PM: ERR! at parseExtends (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13253:28)
3:17:10 PM: ERR! at parse$f (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13191:24)
3:17:10 PM: ERR! at async loadTsconfigJsonForFile (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13751:24)
3:17:10 PM: ERR! at async transformWithEsbuild (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13438:36)
3:17:10 PM: ERR! at script (/opt/build/repo/node_modules/@sveltejs/vite-plugin-svelte/src/preprocess.ts:30:26)
3:17:10 PM: ERR! at process_single_tag (/opt/build/repo/node_modules/svelte/compiler.js:47849:28)
3:17:10 PM: ERR! at async Promise.all (index 0)
3:17:10 PM: ERR! at replace_in_code (/opt/build/repo/node_modules/svelte/compiler.js:47737:27)
3:17:10 PM: ERR! at process_tag (/opt/build/repo/node_modules/svelte/compiler.js:47863:30) {
3:17:10 PM: ERR! importPaths: [Array]
3:17:10 PM: ERR! },
3:17:10 PM: ERR! TSConfckParseError: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: ERR! at resolveExtends (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13299:9)
3:17:10 PM: ERR! at parseExtends (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13253:28)
3:17:10 PM: ERR! at parse$f (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13191:24)
3:17:10 PM: ERR! at async loadTsconfigJsonForFile (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13751:24)
3:17:10 PM: ERR! at async transformWithEsbuild (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13438:36)
3:17:10 PM: ERR! at script (/opt/build/repo/node_modules/@sveltejs/vite-plugin-svelte/src/preprocess.ts:30:26)
3:17:10 PM: ERR! at process_single_tag (/opt/build/repo/node_modules/svelte/compiler.js:47849:28)
3:17:10 PM: ERR! at async Promise.all (index 0)
3:17:10 PM: ERR! at replace_in_code (/opt/build/repo/node_modules/svelte/compiler.js:47737:27)
3:17:10 PM: ERR! at process_tag (/opt/build/repo/node_modules/svelte/compiler.js:47863:30) {
3:17:10 PM: ERR! importPaths: [Array]
3:17:10 PM: ERR! },
3:17:10 PM: ERR! TSConfckParseError: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: ERR! at resolveExtends (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13299:9)
3:17:10 PM: ERR! at parseExtends (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13253:28)
3:17:10 PM: ERR! at parse$f (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13191:24)
3:17:10 PM: ERR! at async loadTsconfigJsonForFile (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13751:24)
3:17:10 PM: ERR! at async transformWithEsbuild (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13438:36)
3:17:10 PM: ERR! at script (/opt/build/repo/node_modules/@sveltejs/vite-plugin-svelte/src/preprocess.ts:30:26)
3:17:10 PM: ERR! at process_single_tag (/opt/build/repo/node_modules/svelte/compiler.js:47849:28)
3:17:10 PM: ERR! at async Promise.all (index 0)
3:17:10 PM: ERR! at replace_in_code (/opt/build/repo/node_modules/svelte/compiler.js:47737:27)
3:17:10 PM: ERR! at process_tag (/opt/build/repo/node_modules/svelte/compiler.js:47863:30) {
3:17:10 PM: ERR! importPaths: [Array]
3:17:10 PM: ERR! },
3:17:10 PM: ERR! TSConfckParseError: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: ERR! at resolveExtends (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13299:9)
3:17:10 PM: ERR! at parseExtends (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13253:28)
3:17:10 PM: ERR! at parse$f (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13191:24)
3:17:10 PM: ERR! at async loadTsconfigJsonForFile (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13751:24)
3:17:10 PM: ERR! at async transformWithEsbuild (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13438:36)
3:17:10 PM: ERR! at script (/opt/build/repo/node_modules/@sveltejs/vite-plugin-svelte/src/preprocess.ts:30:26)
3:17:10 PM: ERR! at process_single_tag (/opt/build/repo/node_modules/svelte/compiler.js:47849:28)
3:17:10 PM: ERR! at async Promise.all (index 0)
3:17:10 PM: ERR! at replace_in_code (/opt/build/repo/node_modules/svelte/compiler.js:47737:27)
3:17:10 PM: ERR! at process_tag (/opt/build/repo/node_modules/svelte/compiler.js:47863:30) {
3:17:10 PM: ERR! importPaths: [Array]
3:17:10 PM: ERR! },
3:17:10 PM: ERR! TSConfckParseError: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: ERR! at resolveExtends (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13299:9)
3:17:10 PM: ERR! at parseExtends (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13253:28)
3:17:10 PM: ERR! at parse$f (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13191:24)
3:17:10 PM: ERR! at async loadTsconfigJsonForFile (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13751:24)
3:17:10 PM: ERR! at async transformWithEsbuild (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13438:36)
3:17:10 PM: ERR! at script (/opt/build/repo/node_modules/@sveltejs/vite-plugin-svelte/src/preprocess.ts:30:26)
3:17:10 PM: ERR! at process_single_tag (/opt/build/repo/node_modules/svelte/compiler.js:47849:28)
3:17:10 PM: ERR! at async Promise.all (index 0)
3:17:10 PM: ERR! at replace_in_code (/opt/build/repo/node_modules/svelte/compiler.js:47737:27)
3:17:10 PM: ERR! at process_tag (/opt/build/repo/node_modules/svelte/compiler.js:47863:30) {
3:17:10 PM: ERR! importPaths: [Array]
3:17:10 PM: ERR! },
3:17:10 PM: ERR! TSConfckParseError: failed to resolve "extends":"./.svelte-kit/tsconfig.json" in /opt/build/repo/tsconfig.json
3:17:10 PM: ERR! at resolveExtends (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13299:9)
3:17:10 PM: ERR! at parseExtends (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13253:28)
3:17:10 PM: ERR! at parse$f (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13191:24)
3:17:10 PM: ERR! at async loadTsconfigJsonForFile (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13751:24)
3:17:10 PM: ERR! at async transformWithEsbuild (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-79892de8.js:13438:36)
3:17:10 PM: ERR! at script (/opt/build/repo/node_modules/@sveltejs/vite-plugin-svelte/src/preprocess.ts:30:26)
3:17:10 PM: ERR! at process_single_tag (/opt/build/repo/node_modules/svelte/compiler.js:47849:28)
3:17:10 PM: ERR! at async Promise.all (index 0)
3:17:10 PM: ERR! at replace_in_code (/opt/build/repo/node_modules/svelte/compiler.js:47737:27)
3:17:10 PM: ERR! at process_tag (/opt/build/repo/node_modules/svelte/compiler.js:47863:30) {
3:17:10 PM: ERR! importPaths: [Array]
3:17:10 PM: ERR! }
3:17:10 PM: ERR! ]
3:17:10 PM: ERR! }
3:17:10 PM: error Command failed with exit code 1. (https://ntl.fyi/exit-code-1)
3:17:10 PM: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
3:17:10 PM:
3:17:10 PM: "build.command" failed
3:17:10 PM: ────────────────────────────────────────────────────────────────
3:17:10 PM:
3:17:10 PM: Error message
3:17:10 PM: Command failed with exit code 1: yarn build-storybook (https://ntl.fyi/exit-code-1)
3:17:10 PM:
3:17:10 PM: Error location
3:17:10 PM: In build.command from netlify.toml:
3:17:10 PM: yarn build-storybook
3:17:10 PM:
3:17:10 PM: Resolved config
3:17:10 PM: build:
3:17:10 PM: command: yarn build-storybook
3:17:10 PM: commandOrigin: config
3:17:10 PM: publish: /opt/build/repo/storybook-static
3:17:10 PM: publishOrigin: config
3:17:11 PM: Caching artifacts
3:17:11 PM: Started saving node modules
3:17:11 PM: Finished saving node modules
3:17:11 PM: Started saving build plugins
3:17:11 PM: Finished saving build plugins
3:17:11 PM: Started saving corepack cache
3:17:11 PM: Finished saving corepack cache
3:17:11 PM: Started saving yarn cache
3:17:16 PM: Finished saving yarn cache
3:17:16 PM: Started saving pip cache
3:17:16 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)
3:17:16 PM: Finished saving pip cache
3:17:16 PM: Started saving emacs cask dependencies
3:17:16 PM: Finished saving emacs cask dependencies
3:17:16 PM: Started saving maven dependencies
3:17:16 PM: Finished saving maven dependencies
3:17:16 PM: Started saving boot dependencies
3:17:16 PM: Finished saving boot dependencies
3:17:16 PM: Started saving rust rustup cache
3:17:16 PM: Finished saving rust rustup cache
3:17:16 PM: Started saving go dependencies
3:17:16 PM: Finished saving go dependencies
3:17:16 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
3:17:16 PM: Failing build: Failed to build site
3:17:16 PM: Finished processing build request in 36.178s
seems like adding "prepack": "svelte-kit sync", fixes the issue, this should be part of default template if this is how you fix the build error on netlify.
This just bit me on vercel, seems like it should be in the default project template.
Happened to me too on Vercel.
Are these new projects?
On May 15, 2023, 23:41, at 23:41, "Vojtěch Marek" @.***> wrote:
Happened to me too on Vercel.
-- Reply to this email directly or view it on GitHub: https://github.com/sveltejs/kit/issues/5390#issuecomment-1548631164 You are receiving this because you modified the open/close state.
Message ID: @.***>
Yes. Just recently created. The project is really basic. It was created with npm create svelte@latest app command.
Are these new projects? … On May 15, 2023, 23:41, at 23:41, "Vojtěch Marek" @.> wrote: Happened to me too on Vercel. -- Reply to this email directly or view it on GitHub: #5390 (comment) You are receiving this because you modified the open/close state. Message ID: @.>
After new updates, getting some errors on build. Node-adaptor creates .svelte-kit folder