vscode-bazel icon indicating copy to clipboard operation
vscode-bazel copied to clipboard

Build script is broken

Open fweikert opened this issue 4 years ago • 1 comments
trafficstars

I created https://github.com/bazelbuild/vscode-bazel/releases/tag/0.5.0 for the next release.

The release instructions tell me to run

npm install -g vsce
vsce package

However, the second command leads to

xargs: ./node_modules/protobufjs/bin/pbjs: No such file or directory
npm ERR! code 127
npm ERR! path /Users/fwe/vscode-bazel
npm ERR! command failed
npm ERR! command sh -c ./scripts/build.sh

I'm not really familiar with npm, and some googling led me to install some packages (pbjs, protobufjs), but without success.

fweikert avatar Oct 29 '21 14:10 fweikert

--> https://github.com/bazelbuild/vscode-bazel/commit/ce36251623fa94ed94489c7ed85d647abc3f9ecd

fweikert avatar Oct 29 '21 14:10 fweikert

This seems to be fixed. vsce package currently completes without error.

jfirebaugh avatar Sep 14 '22 19:09 jfirebaugh

Based on the code it should be [...]/protobufjs-cli/[...] now, right?

fweikert avatar Sep 29 '22 16:09 fweikert

Where do you see protobufjs-cli?

I see:

https://github.com/bazelbuild/vscode-bazel/blob/a0101daa091ad61b714e5bce0e90f72bf03c0e7d/scripts/build.sh#L23-L24

Which matches:

https://github.com/bazelbuild/vscode-bazel/blob/a0101daa091ad61b714e5bce0e90f72bf03c0e7d/package.json#L379-L379

And node_modules/protobufjs/cli/bin/{pbts,pbjs} does exist for me.

The script can be simplified to just use unqualified pbjs, pbts, and tsc commands, because it runs as an npm script, which has node_modules/.bin on the path. But it also works in its current form for me.

jfirebaugh avatar Sep 29 '22 19:09 jfirebaugh

Thanks, I think I somehow screwed up the versions of my dependencies, since I didn't find the binaries in protobufjs (and thus had to install protobufjs-cli). Will try again from a clean slate.

fweikert avatar Oct 04 '22 15:10 fweikert

Thanks for simplifying the script!

fweikert avatar Oct 07 '22 16:10 fweikert