Cannot find package $app
MichaelBrunn3r opened this issue · 4 comments
MichaelBrunn3r commented
Fresh install with these commands:
npm init @svelteness/kit-docs docs
> Skeleton project
> Typescript
> eslint
cd docs
pnpm i
pnpm dev
Yields this error:
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '$app' imported from ...\node_modules\.pnpm\@svelteness+kit-docs@0.23.0_svelte@3.49.0\node_modules\@svelteness\kit-docs\client\polyfills\focus-visible.js
at new NodeError (node:internal/errors:388:5)
at packageResolve (node:internal/modules/esm/resolve:910:9)
at moduleResolve (node:internal/modules/esm/resolve:959:20)
at defaultResolve (node:internal/modules/esm/resolve:1174:11)
at ESMLoader.resolve (node:internal/modules/esm/loader:605:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:318:18)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:80:40)
at link (node:internal/modules/esm/module_job:78:36)
The culprit:
// @svelteness/kit-docs/client/polyfills/focus-visible.js
import { browser } from '$app/env';
$app
would lead me to believe this is a missing alias?
stephane-klein commented
@MichaelBrunn3r same error for me 😐
stephane-klein commented
@MichaelBrunn3r I think that this bug come from sveltejs/kit#5005, the SvelteKit upgrade from Vite 2 to 3.
In short term, I propose to pin Vite version here (see also this comment).
cc @mihar-22
stephane-klein commented
@MichaelBrunn3r I think that this bug come from sveltejs/kit#5005, the SvelteKit upgrade from Vite 2 to 3.
In short term, I propose to pin Vite version here (see also this comment).
Can be fixed by #56
mihar-22 commented
Should be resolved now on latest.