Closed ckddbs closed 1 year ago
Check your lockfile, what version of @opentelemetry/api
is getting pulled into your node_modules?
I see it's available in 1.0.4
which is the version we use and have pinned in core-bentley.
Same version with https://github.com/iTwin/viewer-sample-angular/blob/main/package-lock.json. And @itwin/core-bentley has @opentelemetry/api as devDependencies.
So there are multiple copies of opentelemetry/api, mostly due to other dependencies pulling in a different version.
If you look closely, on our side we're just importing a type, which when compiled to javascript will not exist.
I recommend always turning on the skipLibCheck
flag, mostly due to being unable to control transitive deps being pulled into your app.
Our app has many dependencies besides iTwin, so we don't want to turn on the skipLibCheck
flag. If core-bently uses the library, why don't you add it as dependencies or peer-dependencies?
We're only using the package for types, theres no reason for it to be direct or peer dependency.
https://www.typescriptlang.org/tsconfig#skipLibCheck
"Rather than doing a full check of all d.ts files, TypeScript will type check the code you specifically refer to in your app’s source code."
Why would you want to type check everything in your node modules?