vercel / speed-insights

Vercel Speed Insights package
https://vercel.com/docs/speed-insights
Apache License 2.0
63 stars 9 forks source link

Doesn't provide vite, required by svelte-kit #44

Closed samuelcole closed 10 months ago

samuelcole commented 10 months ago
@vercel/speed-insights@npm:1.0.5 [637a9] doesn't provide vite (p4f048), requested by @sveltejs/kit

and then the build fails:

➤ YN0009: │ @sveltejs/kit@npm:1.30.3 [d7732] couldn't be built successfully (exit code 1, logs can be found here: /private/var/folders/ms/wn16m2cd1xngctwjq1pbl2xm0000gn/T/xfs-50382a50/build.log)
# This file contains the result of Yarn building a package (@sveltejs/kit@virtual:d773296d4d0b47be0bea756d91e51c6ba3b32870ca7a84683cb2bd91ce63cc2ac4d6202c3b67f0b9130aff3985d66040f423b3aa8043c138717f490b8c043048#npm:1.30.3)
# Script name: postinstall

node:internal/errors:497
    ErrorCaptureStackTrace(err);
    ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'vite' imported from /Users/sam/Code/lemontree/node_modules/@sveltejs/kit/src/exports/vite/utils.js
    at new NodeError (node:internal/errors:406:5)
    at packageResolve (node:internal/modules/esm/resolve:789:9)
    at moduleResolve (node:internal/modules/esm/resolve:838:20)
    at defaultResolve (node:internal/modules/esm/resolve:1043:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:228:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
    at link (node:internal/modules/esm/module_job:84:36) {
  code: 'ERR_MODULE_NOT_FOUND'
}

Node.js v20.9.0
samuelcole commented 10 months ago

also strange that yarn is installing @sveltejs/kit at all, since we don't use svelte?

% yarn why @sveltejs/kit
└─ @vercel/speed-insights@npm:1.0.5 [637a9]
   └─ @sveltejs/kit@npm:1.30.3 [d7732] (via npm:^1 [d7732])
igomur commented 10 months ago

+1

` Issues with peer dependencies found

└─ @vercel/speed-insights 1.0.5 └─ @sveltejs/kit 1.30.3 ├── ✕ unmet peer vite@^4.0.0: found 5.0.11 └─ @sveltejs/vite-plugin-svelte 2.5.3 ├── ✕ unmet peer vite@^4.0.0: found 5.0.11 └─ @sveltejs/vite-plugin-svelte-inspector 1.0.4 └── ✕ unmet peer vite@^4.0.0: found 5.0.11 `

mingjunlu commented 10 months ago

Also facing the same issue while upgrading from 1.0.4 to 1.0.5.

(I'm using Astro 4.1.3 without any UI framework)

$ pnpm update @vercel/speed-insights@latest
Packages: +42 -1
++++++++++++++++++++++++++++++++++++++++++-
Progress: resolved 896, reused 851, downloaded 1, added 0, done
Downloading registry.npmjs.org/@next/swc-darwin-arm64/14.1.0: 34.55 MB/34.55 MB, done
Downloading registry.npmjs.org/next/14.1.0: 20.76 MB/20.76 MB, done

dependencies:
- @vercel/speed-insights 1.0.4
+ @vercel/speed-insights 1.0.5

 WARN  Issues with peer dependencies found
.
└─┬ @vercel/speed-insights 1.0.5
  └─┬ @sveltejs/kit 1.30.3
    ├── ✕ unmet peer vite@^4.0.0: found 5.0.11
    └─┬ @sveltejs/vite-plugin-svelte 2.5.3
      ├── ✕ unmet peer vite@^4.0.0: found 5.0.11
      └─┬ @sveltejs/vite-plugin-svelte-inspector 1.0.4
        └── ✕ unmet peer vite@^4.0.0: found 5.0.11
feugy commented 10 months ago

Hey folks! Thanks for your patience. We're working on it.

tobiaslins commented 10 months ago

Hey all! We just released 1.0.6. Let us know if this version resolves the issues for you.

Thanks

mathieug commented 10 months ago

Hey all! We just released 1.0.6. Let us know if this version resolves the issues for you.

Thanks

🙌 It resolved the issue for me.

jaronoff97 commented 10 months ago

I think i'm also getting this but on 1.0.9:


Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'vite' imported from /vercel/path0/node_modules/@sveltejs/kit/src/exports/vite/utils.js
--
23:30:16.591 | at new NodeError (node:internal/errors:406:5)
23:30:16.591 | at packageResolve (node:internal/modules/esm/resolve:789:9)
23:30:16.591 | at moduleResolve (node:internal/modules/esm/resolve:838:20)
23:30:16.591 | at defaultResolve (node:internal/modules/esm/resolve:1043:11)
23:30:16.591 | at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:383:12)
23:30:16.591 | at ModuleLoader.resolve (node:internal/modules/esm/loader:352:25)
23:30:16.591 | at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:228:38)
23:30:16.591 | at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
23:30:16.591 | at link (node:internal/modules/esm/module_job:84:36) {
23:30:16.591 | code: 'ERR_MODULE_NOT_FOUND'
23:30:16.591 | }
23:30:16.591 |  
23:30:16.591 | Node.js v20.9.0
23:30:16.591 |  
23:30:16.591 | error: postinstall script from "@sveltejs/kit" exited with 1
23:30:16.620 | Error: Command "bun install" exited with 1