Skip to content
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

Cannot find package $app #52

Closed
MichaelBrunn3r opened this issue Jul 15, 2022 · 4 comments
Closed

Cannot find package $app #52

MichaelBrunn3r opened this issue Jul 15, 2022 · 4 comments

Comments

@MichaelBrunn3r
Copy link

MichaelBrunn3r commented Jul 15, 2022

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\@[email protected][email protected]\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
Copy link
Contributor

@MichaelBrunn3r same error for me 😐

@stephane-klein
Copy link
Contributor

stephane-klein commented Jul 17, 2022

@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
Copy link
Contributor

@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
Copy link
Contributor

Should be resolved now on latest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants