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

Missing dependency in @sentry/gatsby #2754

Closed
3 tasks done
aaronadamsCA opened this issue Jul 19, 2020 · 6 comments
Closed
3 tasks done

Missing dependency in @sentry/gatsby #2754

aaronadamsCA opened this issue Jul 19, 2020 · 6 comments

Comments

@aaronadamsCA
Copy link
Contributor

Package + Version

"@sentry/gatsby": "^5.19.2"

Description

The plugin's gatsby-browser.js references package @sentry/apm, but the plugin doesn't install the dependency, so gatsby develop fails:

 ERROR #98124  WEBPACK

Generating development JavaScript bundle failed

Can't resolve '@sentry/apm' in '/workspace/packages/web/node_modules/@sentry/gatsby'

If you're trying to use a package make sure that '@sentry/apm' is installed. If you're trying to use a local file make sure that the path is correct.

File: node_modules/@sentry/gatsby/gatsby-browser.js

failed Building development bundle - 13.383s

Workaround is npm install --save @sentry/apm, but according to this repo's README (and the lack of a peer dependency) I don't think I should actually need to do that.

@kamilogorek
Copy link
Contributor

Already mentioned here #2711 (comment)
and fix pending here #2752

@webjay
Copy link

webjay commented Jul 26, 2020

Should this be considered fixed in 5.20.1 because now I get this:

warn Module not found: Error: Can't resolve '@sentry/apm' in '/Users/jacob/Sites/cotrain/node_modules/@sentry/gatsby'
warn Module not found: Error: Can't resolve '@sentry/tracing' in '/Users/jacob/Sites/cotrain/node_modules/@sentry/gatsby'

Should I install those?

@AbhiPrasad
Copy link
Member

Hey @webjay you can ignore this warning. We try to look for our tracing/performance packages for auto-instrumentation purposes, so we try to resolve these packages if they exist. They have no affect on the rest of the functionality.

@aaronadamsCA
Copy link
Contributor Author

Note these warnings happen not just at startup, but on every hot reload. This constant terminal noise isn't great.

image

@webjay
Copy link

webjay commented Jul 28, 2020

I agree, it doesn't feel right.

@AbhiPrasad
Copy link
Member

It seems this is a long standing issue - webpack/webpack#196

I agree that the terminal noise is not ideal, plus it pollutes the console too. We'll make a change to address this.

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

4 participants