sentry-javascript-bundler-plugins
sentry-javascript-bundler-plugins copied to clipboard
@sentry/[email protected] installing extra packages with yarn 3 that break [email protected]
Is there an existing issue for this?
- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- [X] I have reviewed the documentation https://docs.sentry.io/
- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/browser
SDK Version
7.60.0
Framework Version
No response
Link to Sentry event
No response
SDK Setup
No response
Steps to Reproduce
- Using [email protected],
yarn add @sentry/[email protected]. - Run
[email protected]withyarn tsc. - See
tscwith errors such as
.yarn/cache/unplugin-npm-1.0.1-70bc9bb0e2-b6bf00dcc7.zip/node_modules/unplugin/dist/index.d.ts:1:84 - error TS2307: Cannot find module 'rollup' or its corresponding type declarations.
1 import { SourceMapInput, EmittedAsset, AcornNode, Plugin, PluginContextMeta } from 'rollup';
~~~~~~~~
.yarn/cache/unplugin-npm-1.0.1-70bc9bb0e2-b6bf00dcc7.zip/node_modules/unplugin/dist/index.d.ts:2:40 - error TS2307: Cannot find module 'rollup' or its corresponding type declarations.
2 export { Plugin as RollupPlugin } from 'rollup';
~~~~~~~~
.yarn/cache/unplugin-npm-1.0.1-70bc9bb0e2-b6bf00dcc7.zip/node_modules/unplugin/dist/index.d.ts:5:36 - error TS2307: Cannot find module 'vite' or its corresponding type declarations.
5 import { Plugin as Plugin$1 } from 'vite';
~~~~~~
.yarn/cache/unplugin-npm-1.0.1-70bc9bb0e2-b6bf00dcc7.zip/node_modules/unplugin/dist/index.d.ts:6:38 - error TS2307: Cannot find module 'vite' or its corresponding type declarations.
6 export { Plugin as VitePlugin } from 'vite';
~~~~~~
.yarn/cache/unplugin-npm-1.0.1-70bc9bb0e2-b6bf00dcc7.zip/node_modules/unplugin/dist/index.d.ts:7:49 - error TS2307: Cannot find module 'esbuild' or its corresponding type declarations.
7 import { Plugin as Plugin$2, PluginBuild } from 'esbuild';
~~~~~~~~~
.yarn/cache/unplugin-npm-1.0.1-70bc9bb0e2-b6bf00dcc7.zip/node_modules/unplugin/dist/index.d.ts:8:41 - error TS2307: Cannot find module 'esbuild' or its corresponding type declarations.
8 export { Plugin as EsbuildPlugin } from 'esbuild';
~~~~~~~~~
- Run
yarn why -R unpluginand see
├─ @org/package@workspace:package
│ └─ @sentry/webpack-plugin@npm:2.4.0 [e43e3] (via npm:^2.4.0 [e43e3])
│ ├─ @sentry/bundler-plugin-core@npm:2.4.0 (via npm:2.4.0)
│ │ └─ unplugin@npm:1.0.1 (via npm:1.0.1)
│ └─ unplugin@npm:1.0.1 (via npm:1.0.1)
Expected Result
tsc should not report errors because a package doesn't correctly record which dependencies it needs. Yarn is stricter than npm in this regard.
Actual Result
https://github.com/unjs/unplugin/blob/main/package.json#L34 doesn't seem to specify the dependencies it's reaching out for.
I'm running into the exact same issue here. Have you found a (temporary) workaround? Currently I'm using this in my tsconfig:
"skipLibCheck": true, // Remove when https://github.com/getsentry/sentry-javascript-bundler-plugins/issues/354 is resolved
Thanks for writing in!
Unfortunately the dependencies come from the unplugin package and I currently don't know how I would sustainably resolve this issue. We're open to any suggestions!
Short to mid-term plans are to move away from unplugin anyhow. This will implicitly be resolved then.
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀
Should this stay open?
I have now also created this unplugin issue: https://github.com/unjs/unplugin/issues/349 but given how it's designed to work and limitations of npm, I'm not sure there is anything it could do to fix this issue though...
Yes sorry. This shouldn't be closed. Plan is still to move away from unplugin.
I'm not interested in this work going forward. If folks still want it open, feel free to reopen.
For anybody running into this, as a workaround, try not to point tsc to your build config.