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

Failing to compile project because of error in @opentelemetry/otlp-proto-exporter-base #3121

Closed
hectorhdzg opened this issue Jul 28, 2022 · 7 comments · Fixed by #3126
Closed
Labels
bug Something isn't working priority:p4 Bugs and spec inconsistencies which do not fall into a higher prioritization

Comments

@hectorhdzg
Copy link
Member

What happened?

Steps to Reproduce

Clone repo, install dependencies and run "npm run compile" in Windows 11

Expected Result

Compilation is successful

Actual Result

Error being thrown

Additional Details

Any pointers on how to solve the issue would be appreciated.

OpenTelemetry Setup Code

No response

package.json

No response

Relevant log output

lerna info Executing command in 1 package: "npm run protos"
lerna ERR! npm run protos exited 1 in '@opentelemetry/otlp-proto-exporter-base'
lerna ERR! npm run protos stdout:

> @opentelemetry/[email protected] protos
> npm run submodule && node scripts/protos.js


> @opentelemetry/[email protected] submodule
> git submodule sync --recursive && git submodule update --init --recursive

Synchronizing submodule url for '../otlp-grpc-exporter-base/protos'
Synchronizing submodule url for 'protos'

lerna ERR! npm run protos stderr:
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
C:\Repos\opentelemetry-js-fork\experimental\packages\otlp-proto-exporter-base\node_modules\.bin\pbjs:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^

SyntaxError: missing ) after argument list
    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1033:15)
    at Module._compile (node:internal/modules/cjs/loader:1069:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47
C:\Repos\opentelemetry-js-fork\experimental\packages\otlp-proto-exporter-base\scripts\protos.js:26
        reject(new Error(`${command} exited with non-zero code(${code}, ${signal})`));
               ^

Error: C:\Repos\opentelemetry-js-fork\experimental\packages\otlp-proto-exporter-base\node_modules\.bin\pbjs exited with non-zero code(1, null)
    at ChildProcess.<anonymous> (C:\Repos\opentelemetry-js-fork\experimental\packages\otlp-proto-exporter-base\scripts\protos.js:26:16)
    at ChildProcess.emit (node:events:527:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
@hectorhdzg hectorhdzg added bug Something isn't working triage labels Jul 28, 2022
@dyladan
Copy link
Member

dyladan commented Jul 28, 2022

Hmm looks like this might actually be an issue with pbjs not supporting windows?

@hectorhdzg
Copy link
Member Author

This could be related to #3098, is there any easy way to avoid compilation of this particular project?

@legendecas
Copy link
Member

You can execute npm run compile in the sub-packages you are interested in.

@dyladan
Copy link
Member

dyladan commented Jul 29, 2022

@hectorhdzg can you test the PR #3126 ?

@dyladan dyladan added the priority:p4 Bugs and spec inconsistencies which do not fall into a higher prioritization label Jul 29, 2022
@JacksonWeber
Copy link
Contributor

I'm having the same error occur on Windows 11 after pulling the latest changes.

@dyladan
Copy link
Member

dyladan commented Aug 1, 2022

@JacksonWeber can you try the PR at #3126? I don't have a windows PC and neither does @legendecas so it's hard for us to know if the issue is fixed.

@JacksonWeber
Copy link
Contributor

@dyladan Unfortunately that fix doesn't seem to be working for me as I'm running into the same error message as @hectorhdzg

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:p4 Bugs and spec inconsistencies which do not fall into a higher prioritization
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants