Open swaruparameshpajju opened 1 month ago
@swaruparameshpajju can you provide some more detail about how this error came up? Is there a way we can reproduce this to understand what may need to be changed?
Also it looks like you are using an older version; are you able to try the latest version to see if you still have trouble?
Hi, need to use same version. can u suggest how to go ahead to resolve
Hi @swaruparameshpajju
I agree with @JamieDanielson. You should try to update the package.
Maybe I'm going to do a lot of assumptions. It would be good if you can confirm them.
opentelemtry-js-contrib
then runs some scriptsauto-instrumentations-node@0.39.2
Based on that the the somple npm install
script fails because of the following.
@opentelemetry/contrib-test-utils
failsWe see this log
[10 10:44:56.168] | lerna ERR! lifecycle "prepare" errored in "@opentelemetry/contrib-test-utils", exiting 1
and prepare
script s doing a compilation https://github.com/open-telemetry/opentelemetry-js-contrib/blob/d1436eb7e4543d92e23cb1ceff15bf5cf6c3c65c/packages/opentelemetry-test-utils/package.json#L16
I've checked out the same TAG auto-instrumentations-node-v0.39.2
and got a similar compilation issue in the npm install
process. Here is the output
> @opentelemetry/contrib-test-utils@0.34.1 compile
> tsc -p .
src/resource-assertions.ts:201:20 - error TS2339: Property 'NAME' does not exist on type '{ "telemetry.sdk.name": string; "process.runtime.name": string; "telemetry.sdk.language": string; "telemetry.sdk.version": string; }'.
201 name: SDK_INFO.NAME,
~~~~
src/resource-assertions.ts:202:24 - error TS2339: Property 'LANGUAGE' does not exist on type '{ "telemetry.sdk.name": string; "process.runtime.name": string; "telemetry.sdk.language": string; "telemetry.sdk.version": string; }'.
202 language: SDK_INFO.LANGUAGE,
~~~~~~~~
src/resource-assertions.ts:203:23 - error TS2339: Property 'VERSION' does not exist on type '{ "telemetry.sdk.name": string; "process.runtime.name": string; "telemetry.sdk.language": string; "telemetry.sdk.version": string; }'.
203 version: SDK_INFO.VERSION,
~~~~~~~
Problem here is that @opentelemetry/core
did change the property names if the SDK_INFO
object in https://github.com/open-telemetry/opentelemetry-js/pull/2173/files#diff-7c29fd1242f26460e18708792e9636800d9f1f7320de3ef32609454df4dfca92 and npm installs a more recent version which contains this change. That was before v1.0.0 was released
So the @opentelemetry/contrib-test-utils
declares a dependency of @opentelemetry/core@^1.0.0
but is using types from a previous release. There isn't an easy solution for that so I strongly recommend the update.
May I ask why exactly you need that version? And why do you have to build it by yourself since its already available in npm registry?
What happened?
2024-07-10 10:40:58,968 [ INFO ] oos_automation.build.@opentelemetry/auto-instrumentations-node@0.39.2 | log_utils.py | 175 :: Environment +----------------------+------------------------------------------------------------------------------------------------------+ | ENV | VALUE | |----------------------+------------------------------------------------------------------------------------------------------| | PACKAGE | @opentelemetry/auto-instrumentations-node@0.39.2 | | LANGUAGE | node | | FRAMEWORK | node | | BUILD_CMD | npm run build | | OS_NAME | Oracle Linux Server | | OS_VERSION | 8.8 | | COMPILER/INTERPRETER | node | | PYTHON_VERSION | 3.9.6 | | JAVA_VERSION | 1.8.0_382 | | MAVEN_VERSION | 3.9.4 | | GRADLE_VERSION | 8.2.1 | | ANT_VERSION | 1.10.14 | | NODE_VERSION | 16.20.2 | | CPP_VERSION | 8.5.0 | | GO_VERSION | go1.22.0 | | CARGO_VERSION | 1.75.0 | | HTTP_PROXY | www-proxy.us.oracle.com | | HTTPS_PROXY | www-proxy.us.oracle.com | | JAVA_HOME | /opt/jdk8u382-b05 | | PATH | /opt/node-v16.20.2-linux-x64/bin:/opt/jdk8u382-b05/bin:/opt/apache-ant-1.10.14/bin:/opt/apache-maven | | | -3.9.4/bin:/opt/gradle-8.2.1/bin:/opt/sbt/bin:/opt/python3.9/bin:/opt/node-v16.20.2-linux-x64/bin:/o | | | pt/go1.22.0/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | +----------------------+------------------------------------------------------------------------------------------------------+ 2024-07-10 10:40:58,968 [ DEBUG ] oos_automation.build.@opentelemetry/auto-instrumentations-node@0.39.2 | package.py | 679 :: Current dir: /builds/5G-Common/cnc-opensource/cnc-opensource-build 2024-07-10 10:40:58,968 [ INFO ] oos_automation.build.@opentelemetry/auto-instrumentations-node@0.39.2 | package.py | 831 :: Got some command in build cmds, executing it 2024-07-10 10:40:58,969 [ DEBUG ] oos_automation.build.@opentelemetry/auto-instrumentations-node@0.39.2 | cmd.py | 51 :: version='1', cmd_type='live', running command=npm run build, supress_exception=True 2024-07-10 10:40:58,976 [ INFO ] oos_automation.build.@opentelemetry/auto-instrumentations-node@0.39.2 | cmd.py | 62 :: Waiting for cmd out... [10 10:40:59.505] | npm WARN config
_auth
,_authToken
,username
and_password
must be scoped to a registry. seenpm help npmrc
for more information. [10 10:40:59.529] | npm ERR! Missing script: "build" [10 10:40:59.529] | npm ERR! [10 10:40:59.529] | npm ERR! To see a list of scripts, run: [10 10:40:59.529] | npm ERR! npm run [10 10:40:59.531] | [10 10:40:59.532] | npm ERR! A complete log of this run can be found in: [10 10:40:59.532] | npm ERR! /root/.npm/_logs/2024-07-10T10_40_59_465Z-debug-0.logOpenTelemetry Setup Code
No response
package.json
No response
Relevant log output