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

SvelteKitError: Not found: /_vercel/insights/script.js with playwright/test #138

Open
shinokada opened this issue Mar 17, 2024 · 0 comments

Comments

@shinokada
Copy link

shinokada commented Mar 17, 2024

I use the following to SvelteKit:

import { inject } from '@vercel/analytics';
inject();

When I run pnpm test:integration that runs playwright test, the test passes but outputs the following:

1 test.ts:3:1 › index page has expected h1
[WebServer] SvelteKitError: Not found: /_vercel/insights/script.js
    at resolve2 (file:///Users/shinichiokada/Svelte/SVELTE-ICON-FAMILY/svelte-awesome-icons/.svelte-kit/output/server/index.js:3603:18)
    at resolve (file:///Users/shinichiokada/Svelte/SVELTE-ICON-FAMILY/svelte-awesome-icons/.svelte-kit/output/server/index.js:3435:34)
    at #options.hooks.handle (file:///Users/shinichiokada/Svelte/SVELTE-ICON-FAMILY/sve
  ✓  1 test.ts:3:1 › index page has expected h1 (1.1s)
    at respond (file:///Users/shinichiokada/Svelte/SVELTE-ICON-FAMILY/svelte-awesome-icons/.svelte-kit/output/server/index.js:3433:43)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  status: 404,
  text: 'Not Found'
}

I tried the following, but the results are the same:

    import { dev } from '$app/environment';
    import { inject } from '@vercel/analytics';
    inject({ mode: dev ? 'development' : 'production' });

System info

System:
    OS: macOS 14.4
    CPU: (10) arm64 Apple M2 Pro
    Memory: 81.28 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node
    npm: 10.2.4 - ~/.nvm/versions/node/v20.10.0/bin/npm
    pnpm: 8.15.4 - /opt/homebrew/bin/pnpm
    bun: 1.0.13 - ~/.bun/bin/bun
  Browsers:
    Chrome: 122.0.6261.129
    Edge: 122.0.2365.92
    Safari: 17.4
  npmPackages:
    @sveltejs/adapter-auto: ^3.1.1 => 3.1.1 
    @sveltejs/kit: ^2.5.4 => 2.5.4 
    @sveltejs/package: ^2.3.0 => 2.3.0 
    @sveltejs/vite-plugin-svelte: ^3.0.2 => 3.0.2 
    svelte: ^4.2.12 => 4.2.12 
    vite: ^5.1.6 => 5.1.6 
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

1 participant