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

Undeclared Dependency: mysql2 → sql-common #1586

Closed
zaq42 opened this issue Jul 14, 2023 · 8 comments
Closed

Undeclared Dependency: mysql2 → sql-common #1586

zaq42 opened this issue Jul 14, 2023 · 8 comments
Assignees
Labels
bug Something isn't working priority:p1 Bugs which cause problems in end-user applications such as crashes, data inconsistencies

Comments

@zaq42
Copy link

zaq42 commented Jul 14, 2023

What version of OpenTelemetry are you using?

    "@opentelemetry/api": "^1.4.1",
    "@opentelemetry/instrumentation": "^0.41.0",
    "@opentelemetry/instrumentation-mysql2": "^0.34.0",

What version of Node are you using?

node:18-bullseye-slim (18.16.1)

What did you do?

Updated to
"@opentelemetry/instrumentation-mysql2": "^0.34.0"
from 0.33.4

What did you expect to see?

App startup as normal

What did you see instead?

Error during startup:

@opentelemetry/instrumentation-mysql2 tried to access @opentelemetry/sql-common, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Required package: @opentelemetry/sql-common
Required by: @opentelemetry/instrumentation-mysql2@virtual:75deb627e23e1c457a881d4183420467621628860af1bbe80272dda7b5a90b71b393ebf4013b1f4a513e72bedfb00fd59d03c13e311458d0945150f0849ebaec#npm:0.34.0 

Additional context

Using Yarn 3.6.1 (pnp)

This issue appears to relate to this commit

Workaround is this addition in .yarnrc.yml:

packageExtensions:
  "@opentelemetry/instrumentation-mysql2@^0.34.0":
    dependencies:
      "@opentelemetry/sql-common": ^0.40.0
@zaq42 zaq42 added the bug Something isn't working label Jul 14, 2023
@dyladan
Copy link
Member

dyladan commented Jul 19, 2023

@dyladan dyladan added the priority:p1 Bugs which cause problems in end-user applications such as crashes, data inconsistencies label Jul 19, 2023
@dyladan
Copy link
Member

dyladan commented Jul 19, 2023

/cc @haddasbronfman

@dyladan
Copy link
Member

dyladan commented Jul 19, 2023

Actually it looks like this isn't a problem with the code. The repo package.json has the dependency. I'll download the tarball and inspect its package.json to make sure it was properly published. Hopefully we're not seeing a publishing bug.

@dyladan dyladan self-assigned this Jul 19, 2023
@dyladan
Copy link
Member

dyladan commented Jul 19, 2023

Looks like sql-common is listed as a devDependency but is actually used in instrumentation.ts

@dyladan
Copy link
Member

dyladan commented Jul 19, 2023

instrumentation-pg has the dependency correctly listed. mysql doesn't use the package.

@lizthegrey
Copy link
Member

Likewise seeing with yarn 4.0.0-rc.48

Error: @opentelemetry/instrumentation-mysql2 tried to access @opentelemetry/sql-common, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

lizthegrey added a commit to eve-val/eve-roster that referenced this issue Jul 19, 2023
lizthegrey added a commit to eve-val/eve-roster that referenced this issue Jul 19, 2023
@lizthegrey
Copy link
Member

This is fixed now I believe.

@david-luna
Copy link
Contributor

Yes it was fixed in this PR #1584

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:p1 Bugs which cause problems in end-user applications such as crashes, data inconsistencies
Projects
None yet
Development

No branches or pull requests

5 participants