-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
typecheck fails when import type from ./$types
#13614
Comments
I see that you're using bun - is it not running the |
➜ bun run prepare
$ svelte-kit sync || echo ''
➜ bun run build
$ vite build && bun run prepack
vite v6.2.2 building SSR bundle for production...
✓ 159 modules transformed.
vite v6.2.2 building for production...
✓ 141 modules transformed.
.svelte-kit/output/client/_app/version.json 0.03 kB │ gzip: 0.05 kB
.svelte-kit/output/client/.vite/manifest.json 2.95 kB │ gzip: 0.58 kB
.svelte-kit/output/client/_app/immutable/assets/2.BnWmujQL.css 0.04 kB │ gzip: 0.06 kB
.svelte-kit/output/client/_app/immutable/entry/start.D_ORPpFE.js 0.08 kB │ gzip: 0.09 kB
.svelte-kit/output/client/_app/immutable/chunks/NIZ21t0L.js 0.32 kB │ gzip: 0.25 kB
.svelte-kit/output/client/_app/immutable/nodes/0.CBlHV_J2.js 0.33 kB │ gzip: 0.24 kB
.svelte-kit/output/client/_app/immutable/chunks/MEPW_APn.js 0.97 kB │ gzip: 0.62 kB
.svelte-kit/output/client/_app/immutable/chunks/BBmf3TEU.js 1.00 kB │ gzip: 0.57 kB
.svelte-kit/output/client/_app/immutable/nodes/1.AoBglGAZ.js 1.04 kB │ gzip: 0.61 kB
.svelte-kit/output/client/_app/immutable/chunks/C-_F0pL2.js 1.67 kB │ gzip: 0.95 kB
.svelte-kit/output/client/_app/immutable/chunks/D6tdrY-o.js 3.20 kB │ gzip: 1.52 kB
.svelte-kit/output/client/_app/immutable/entry/app.vEwLjz8R.js 6.50 kB │ gzip: 3.09 kB
.svelte-kit/output/client/_app/immutable/chunks/DAHvuMGr.js 12.64 kB │ gzip: 5.13 kB
.svelte-kit/output/client/_app/immutable/chunks/DzLSSGGM.js 32.36 kB │ gzip: 12.61 kB
.svelte-kit/output/client/_app/immutable/nodes/2.B21DaRUe.js 208.72 kB │ gzip: 72.06 kB
✓ built in 443ms
.svelte-kit/output/server/.vite/manifest.json 2.00 kB
.svelte-kit/output/server/_app/immutable/assets/_page.BnWmujQL.css 0.04 kB
.svelte-kit/output/server/entries/fallbacks/layout.svelte.js 0.17 kB
.svelte-kit/output/server/internal.js 0.31 kB
.svelte-kit/output/server/chunks/escaping.js 0.53 kB
.svelte-kit/output/server/chunks/equality.js 0.77 kB
.svelte-kit/output/server/entries/fallbacks/error.svelte.js 1.52 kB
.svelte-kit/output/server/entries/pages/_page.svelte.js 1.56 kB
.svelte-kit/output/server/chunks/index.js 2.54 kB
.svelte-kit/output/server/chunks/exports.js 6.89 kB
.svelte-kit/output/server/chunks/internal.js 42.71 kB
.svelte-kit/output/server/index.js 105.50 kB
✓ built in 1.17s
Run npm run preview to preview your production build locally.
> Using @sveltejs/adapter-vercel
✔ done
$ svelte-kit sync && svelte-package && publint
src/lib -> dist
Running publint v0.3.9 for @sveltejs-labs/chart.js...
Packing files with `bun pack`...
Linting...
All good!
➜ bun run check
$ svelte-kit sync && svelte-check --tsconfig ./tsconfig.json
====================================
Loading svelte-check in workspace: /Users/minsoochoo/WebstormProjects/chartjs
Getting Svelte diagnostics...
/Users/minsoochoo/WebstormProjects/chartjs/src/lib/utils/chart.svelte.ts:2:31
Error: Cannot find module './$types' or its corresponding type declarations.
import type { Action } from 'svelte/action';
import type { Snapshot } from './$types';
import type { ChartData, ChartOptions, ChartTypeRegistry, UpdateMode } from 'chart.js';
====================================
svelte-check found 1 error and 0 warnings in 1 file
error: script "check" exited with code 1 Using npm causes the same problem ➜ rm -rf node_modules
➜ npm i
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/config-array instead
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
npm warn deprecated @humanwhocodes/[email protected]: Use @eslint/object-schema instead
npm warn deprecated [email protected]: This version is no longer supported. Please see https://eslint.org/version-support for other options.
> @sveltejs-labs/[email protected] prepare
> svelte-kit sync || echo ''
added 605 packages, and audited 606 packages in 31s
164 packages are looking for funding
run `npm fund` for details
4 vulnerabilities (2 low, 2 moderate)
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
➜ npm run check
> @sveltejs-labs/[email protected] check
> svelte-kit sync && svelte-check --tsconfig ./tsconfig.json
====================================
Loading svelte-check in workspace: /Users/minsoochoo/WebstormProjects/chartjs
Getting Svelte diagnostics...
/Users/minsoochoo/WebstormProjects/chartjs/src/lib/utils/chart.svelte.ts:2:31
Error: Cannot find module './$types' or its corresponding type declarations.
import type { Action } from 'svelte/action';
import type { Snapshot } from './$types';
import type { ChartData, ChartOptions, ChartTypeRegistry, UpdateMode } from 'chart.js';
====================================
svelte-check found 1 error and 0 warnings in 1 file |
Closing since this works as expected - you are using |
Describe the bug
Reproduction
Fork https://github.com/sveltejs-labs/chart.js, install dependencies, and run
Logs
System Info
Severity
annoyance
Additional Information
No response
Edit: reproduction from the most recent commit
The text was updated successfully, but these errors were encountered: