census-instrumentation / opencensus-node

A stats collection and distributed tracing framework
https://opencensus.io
Apache License 2.0
273 stars 96 forks source link

npm error at exporter-zpages #62

Closed danielkhan closed 6 years ago

danielkhan commented 6 years ago

On a fresh clone, running npm install exits with an error

lerna ERR! execute Error occured with '@opencensus/exporter-zpages' while running 'npm run prepare'
{ Error: Command failed: npm run prepare
npm ERR! missing script: compile;
...}
kjin commented 6 years ago

Are you running on Windows? It looks like the compile script is bash-specific. @djonathascardoso would you mind looking into this?

djonathascardoso commented 6 years ago

Probably is a problem with Windows. @danielkhan could you confirm your OS?

kjin commented 6 years ago

@djonathascardoso I was able to re-produce this on Windows. We should rethink the process for having multiple commands in a single script, since ; is not portable (also, it ignores exit code values).

OsvaldoRosado commented 6 years ago

I ran into this as well. Definitely Windows specific. Quick and easy workaround is to use WSL/Bash on Windows https://docs.microsoft.com/en-us/windows/wsl/install-win10

; vs && isn't the only problem. There's also reliance on POSIX tools like cp

danielkhan commented 6 years ago

Yes I can confirm that this happened on a windows machine. Thank you for the swift response.

kjin commented 6 years ago

@OsvaldoRosado @danielkhan Thanks for the responses. Supporting Windows is important (after all, we don't want to be restrictive on the platform) but at this early stage we haven't had a chance to fully test things out on Windows.

I will go through the npm scripts and make changes that will be more cross-platform, but I think some more complex commands might need to warrant a longer-term solution.