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

npm module @bufbuild/buf@1.47.1 (current latest) is broken #3469

Closed
parrotmac opened this issue Nov 13, 2024 · 9 comments
Closed

npm module @bufbuild/buf@1.47.1 (current latest) is broken #3469

parrotmac opened this issue Nov 13, 2024 · 9 comments
Assignees
Labels
Bug Something isn't working

Comments

@parrotmac
Copy link

GitHub repository with your minimal reproducible example (do not leave this field blank or fill out this field with "github.com/bufbuild/buf" or we will automatically close your issue, see the instructions above!)

this is not necessary

Commands

docker run -it --rm --name buf-test --workdir /app node:alpine /bin/sh -c 'npm install @bufbuild/buf@1.47.1'

Output

npm error code 1
npm error path /app/node_modules/@bufbuild/buf
npm error command failed
npm error command sh -c node ./install.js
npm error /app/node_modules/@bufbuild/buf/install.js:87
npm error     throw new Error(
npm error           ^
npm error
npm error Error: Expected "1.47.1" but got "1.47.0"
npm error     at validateBinaryVersion (/app/node_modules/@bufbuild/buf/install.js:87:11)
npm error     at checkAllBinaries (/app/node_modules/@bufbuild/buf/install.js:118:7)
npm error
npm error Node.js v23.1.0
npm error A complete log of this run can be found in: /root/.npm/_logs/2024-11-13T23_23_05_380Z-debug-0.log

Expected Output

The equivalent of what you see when install 1.47.0

docker run -it --rm --name buf-test --workdir /app node:alpine /bin/sh -c 'npm install @bufbuild/buf@1.47.0'

added 2 packages in 7s

Anything else?

It would be great to know more about what happened here. If it's the same code in both 1.47.0 and 1.47.1 and the patch was just bumped then that's great. That said, unexpected/unreleased versions on NPM can be scary.

Thanks!

@parrotmac parrotmac added the Bug Something isn't working label Nov 13, 2024
@parrotmac parrotmac changed the title @bufbuild/buf@1.47.1 is broken npm module @bufbuild/buf@1.47.1 (current latest) is broken Nov 13, 2024
@doriable
Copy link
Member

Thanks for filing this issue! Yes, the intention was to release a revision to 1.47.0 (e.g. 1.47.0-1) but we made an error in our release process and unintentionally released 1.47.1. We've fixed this and the latest version should now be 1.47.0-1:

$ npm info @bufbuild/buf

@bufbuild/buf@1.47.0-1 | Apache-2.0 | deps: none | versions: 51
The buf CLI is a tool for working with Protocol Buffers.
https://github.com/bufbuild/buf#readme

bin: buf, protoc-gen-buf-breaking, protoc-gen-buf-lint

dist
.tarball: https://registry.npmjs.org/@bufbuild/buf/-/buf-1.47.0-1.tgz
.shasum: 21aa172c9bf429ffe7adbf814e6d7e0c7b94844b
.integrity: sha512-kbSuBk8EY6q8pOqxqG1DMymFq1FRbx+KV/kJ9XXLFdLESPYEIIajxTbDExEvRqOMHiAvRyEB00yK7NOvWEsSxw==
.unpackedSize: 26.3 kB

maintainers:
- srikrsna-buf <skrishna@buf.build>
- jdailey_buf <jdailey@buf.build>
- sayers-buf <sayers@buf.build>
- psachs-buf <psachs@buf.build>
- bufbot <bot@buf.build>
- tstamm-buf <tstamm@buf.build>
- bufdev <pedge@buf.build>

dist-tags:
latest: 1.47.0-1

published just now by bufbot <bot@buf.build>

Hopefully everything is resolved now, and please let me know if you run into any additional issues. Thanks!

@Ludea
Copy link

Ludea commented Nov 14, 2024

Idk if relevant but get

.../node_modules/@bufbuild/buf postinstall: [buf] Failed to find package "@bufbuild/buf-linux-x64" on the file system
.../node_modules/@bufbuild/buf postinstall: This can happen if you use the "--no-optional" flag. The "optionalDependencies"
.../node_modules/@bufbuild/buf postinstall: package.json feature is used by buf to install the correct binary executable
.../node_modules/@bufbuild/buf postinstall: for your current platform. Going to try installing from npm directly.
.../node_modules/@bufbuild/buf postinstall: [buf] Trying to install package "@bufbuild/buf-linux-x64" using npm
.../esbuild@0.21.5/node_modules/esbuild postinstall: Done
.../node_modules/@bufbuild/buf postinstall: node:internal/errors:984
.../node_modules/@bufbuild/buf postinstall:   const err = new Error(message);
.../node_modules/@bufbuild/buf postinstall:               ^
.../node_modules/@bufbuild/buf postinstall: Error: Command failed: npm install --loglevel=error --prefer-offline --no-audit --progress=false @bufbuild/buf-linux-x64@1.47.1
.../node_modules/@bufbuild/buf postinstall: npm error code ETARGET
.../node_modules/@bufbuild/buf postinstall: npm error notarget No matching version found for @bufbuild/buf-linux-x64@1.47.1.
.../node_modules/@bufbuild/buf postinstall: npm error notarget In most cases you or one of your dependencies are requesting
.../node_modules/@bufbuild/buf postinstall: npm error notarget a package version that doesn't exist.
.../node_modules/@bufbuild/buf postinstall: npm error A complete log of this run can be found in: /home/runner/.npm/_logs/2024-11-14T07_33_56_988Z-debug-0.log
.../node_modules/@bufbuild/buf postinstall:     at genericNodeError (node:internal/errors:984:15)
.../node_modules/@bufbuild/buf postinstall:     at wrappedFn (node:internal/errors:538:14)
.../node_modules/@bufbuild/buf postinstall:     at checkExecSyncError (node:child_process:891:11)
.../node_modules/@bufbuild/buf postinstall:     at Object.execSync (node:child_process:963:15)
.../node_modules/@bufbuild/buf postinstall:     at installUsingNPM (/home/runner/work/lucle/lucle/web/node_modules/.pnpm/@bufbuild+buf@1.47.1/node_modules/@bufbuild/buf/install.js:129:19)
.../node_modules/@bufbuild/buf postinstall:     at checkAndPreparePackage (/home/runner/work/lucle/lucle/web/node_modules/.pnpm/@bufbuild+buf@1.47.1/node_modules/@bufbuild/buf/install.js:108:5)
.../node_modules/@bufbuild/buf postinstall:     at checkAllBinaries (/home/runner/work/lucle/lucle/web/node_modules/.pnpm/@bufbuild+buf@1.47.1/node_modules/@bufbuild/buf/install.js:116:30)
.../node_modules/@bufbuild/buf postinstall:     at Object.<anonymous> (/home/runner/work/lucle/lucle/web/node_modules/.pnpm/@bufbuild+buf@1.47.1/node_modules/@bufbuild/buf/install.js:163:1)
.../node_modules/@bufbuild/buf postinstall:     at Module._compile (node:internal/modules/cjs/loader:1469:14)
.../node_modules/@bufbuild/buf postinstall:     at Module._extensions..js (node:internal/modules/cjs/loader:1548:10) {
.../node_modules/@bufbuild/buf postinstall:   status: 1,
.../node_modules/@bufbuild/buf postinstall:   signal: null,
.../node_modules/@bufbuild/buf postinstall:   output: [
.../node_modules/@bufbuild/buf postinstall:     null,
.../node_modules/@bufbuild/buf postinstall:     Buffer(0) [Uint8Array] [],
.../node_modules/@bufbuild/buf postinstall:     Buffer(356) [Uint8Array] [
.../node_modules/@bufbuild/buf postinstall:       110, 112, 109,  32, 101, 114, 114, 111, 114,  32,  99, 111,
.../node_modules/@bufbuild/buf postinstall:       100, 101,  32,  69,  84,  65,  82,  71,  69,  84,  10, 110,
.../node_modules/@bufbuild/buf postinstall:       112, 109,  32, 101, 114, 114, 111, 114,  32, 110, 111, 116,
.../node_modules/@bufbuild/buf postinstall:        97, 114, 103, 101, 116,  32,  78, 111,  32, 109,  97, 116,
.../node_modules/@bufbuild/buf postinstall:        99, 104, 105, 110, 103,  32, 118, 101, 114, 115, 105, 111,
.../node_modules/@bufbuild/buf postinstall:       110,  32, 102, 111, 117, 110, 100,  32, 102, 111, 114,  32,
.../node_modules/@bufbuild/buf postinstall:        64,  98, 117, 102,  98, 117, 105, 108, 100,  47,  98, 117,
.../node_modules/@bufbuild/buf postinstall:       102,  45, 108, 105, 110, 117, 120,  45, 120,  54,  52,  64,
.../node_modules/@bufbuild/buf postinstall:        49,  46,  52,  55,
.../node_modules/@bufbuild/buf postinstall:       ... 256 more items
.../node_modules/@bufbuild/buf postinstall:     ]
.../node_modules/@bufbuild/buf postinstall:   ],
.../node_modules/@bufbuild/buf postinstall:   pid: 1934,
.../node_modules/@bufbuild/buf postinstall:   stdout: Buffer(0) [Uint8Array] [],
.../node_modules/@bufbuild/buf postinstall:   stderr: Buffer(356) [Uint8Array] [
.../node_modules/@bufbuild/buf postinstall:     110, 112, 109,  32, 101, 114, 114, 111, 114,  32,  99, 111,
.../node_modules/@bufbuild/buf postinstall:     100, 101,  32,  69,  84,  65,  82,  71,  69,  84,  10, 110,
.../node_modules/@bufbuild/buf postinstall:     112, 109,  32, 101, 114, 114, 111, 114,  32, 110, 111, 116,
.../node_modules/@bufbuild/buf postinstall:      97, 114, 103, 101, 116,  32,  78, 111,  32, 109,  97, 116,
.../node_modules/@bufbuild/buf postinstall:      99, 104, 105, 110, 103,  32, 118, 101, 114, 115, 105, 111,
.../node_modules/@bufbuild/buf postinstall:     110,  32, 102, 111, 117, 110, 100,  32, 102, 111, 114,  32,
.../node_modules/@bufbuild/buf postinstall:      64,  98, 117, 102,  98, 117, 105, 108, 100,  47,  98, 117,
.../node_modules/@bufbuild/buf postinstall:     102,  45, 108, 105, 110, 117, 120,  45, 120,  54,  52,  64,
.../node_modules/@bufbuild/buf postinstall:      49,  46,  52,  55,
.../node_modules/@bufbuild/buf postinstall:     ... 256 more items
.../node_modules/@bufbuild/buf postinstall:   ]
.../node_modules/@bufbuild/buf postinstall: }
.../node_modules/@bufbuild/buf postinstall: Node.js v20.18.0
.../node_modules/@bufbuild/buf postinstall: Failed

It happen during ci on GHA

@bobinfra1006
Copy link

bobinfra1006 commented Nov 14, 2024

I also encountered the same problem

@aki-caffeine
Copy link

Hello @doriable.

It is unfortunate that the version was released incorrectly, but that version is already in use in various products. We are very confused that the version was physically removed from the artifact repository without notice.

We hope that you will be able to use 1.47.1 as before. Thank you.

@glaninfar
Copy link

.../node_modules/@bufbuild/buf postinstall$ node ./install.js
.../node_modules/vue-demi postinstall$ node -e "try{require('./scripts/postinstall.js')}catch(e){}"
.../node_modules/@bufbuild/buf postinstall: [buf] Failed to find package "@bufbuild/buf-linux-x64" on the file system
.../node_modules/@bufbuild/buf postinstall: This can happen if you use the "--no-optional" flag. The "optionalDependencies"
.../node_modules/@bufbuild/buf postinstall: package.json feature is used by buf to install the correct binary executable
.../node_modules/@bufbuild/buf postinstall: for your current platform. Going to try installing from npm directly.
.../node_modules/@bufbuild/buf postinstall: [buf] Trying to install package "@bufbuild/buf-linux-x64" using npm
.../node_modules/vue-demi postinstall: Done
.../node_modules/@bufbuild/buf postinstall: node:internal/errors:984
.../node_modules/@bufbuild/buf postinstall:   const err = new Error(message);
.../node_modules/@bufbuild/buf postinstall:               ^
.../node_modules/@bufbuild/buf postinstall: Error: Command failed: npm install --loglevel=error --prefer-offline --no-audit --progress=false @bufbuild/buf-linux-x64@1.47.1
.../node_modules/@bufbuild/buf postinstall: npm error code ETARGET
.../node_modules/@bufbuild/buf postinstall: npm error notarget No matching version found for @bufbuild/buf-linux-x64@1.47.1.
.../node_modules/@bufbuild/buf postinstall: npm error notarget In most cases you or one of your dependencies are requesting
.../node_modules/@bufbuild/buf postinstall: npm error notarget a package version that doesn't exist.
.../node_modules/@bufbuild/buf postinstall: npm error A complete log of this run can be found in: /home/runner/.npm/_logs/2024-11-14T08_45_26_001Z-debug-0.log
.../node_modules/@bufbuild/buf postinstall:     at genericNodeError (node:internal/errors:984:15)
.../node_modules/@bufbuild/buf postinstall:     at wrappedFn (node:internal/errors:538:14)
.../node_modules/@bufbuild/buf postinstall:     at checkExecSyncError (node:child_process:891:11)
.../node_modules/@bufbuild/buf postinstall:     at Object.execSync (node:child_process:963:15)
.../node_modules/@bufbuild/buf postinstall:     at installUsingNPM (/home/runner/work/wecasino-ops/wecasino-ops/node_modules/.pnpm/@bufbuild+buf@1.47.1/node_modules/@bufbuild/buf/install.js:129:19)
.../node_modules/@bufbuild/buf postinstall:     at checkAndPreparePackage (/home/runner/work/wecasino-ops/wecasino-ops/node_modules/.pnpm/@bufbuild+buf@1.47.1/node_modules/@bufbuild/buf/install.js:108:5)
.../node_modules/@bufbuild/buf postinstall:     at checkAllBinaries (/home/runner/work/wecasino-ops/wecasino-ops/node_modules/.pnpm/@bufbuild+buf@1.47.1/node_modules/@bufbuild/buf/install.js:116:30)
.../node_modules/@bufbuild/buf postinstall:     at Object.<anonymous> (/home/runner/work/wecasino-ops/wecasino-ops/node_modules/.pnpm/@bufbuild+buf@1.47.1/node_modules/@bufbuild/buf/install.js:163:1)
.../node_modules/@bufbuild/buf postinstall:     at Module._compile (node:internal/modules/cjs/loader:1469:14)
.../node_modules/@bufbuild/buf postinstall:     at Module._extensions..js (node:internal/modules/cjs/loader:1548:10) {
.../node_modules/@bufbuild/buf postinstall:   status: 1,
.../node_modules/@bufbuild/buf postinstall:   signal: null,
.../node_modules/@bufbuild/buf postinstall:   output: [
.../node_modules/@bufbuild/buf postinstall:     null,
.../node_modules/@bufbuild/buf postinstall:     Buffer(0) [Uint8Array] [],
.../node_modules/@bufbuild/buf postinstall:     Buffer(356) [Uint8Array] [
.../node_modules/@bufbuild/buf postinstall:       110, 112, 109,  32, 101, 114, 114, 111, 114,  32,  99, 111,
.../node_modules/@bufbuild/buf postinstall:       100, 101,  32,  69,  84,  65,  82,  71,  69,  84,  10, 110,
.../node_modules/@bufbuild/buf postinstall:       112, 109,  32, 101, 114, 114, 111, 114,  32, 110, 111, 116,
.../node_modules/@bufbuild/buf postinstall:        97, 114, 103, 101, 116,  32,  78, 111,  32, 109,  97, 116,
.../node_modules/@bufbuild/buf postinstall:        99, 104, 105, 110, 103,  32, 118, 101, 114, 115, 105, 111,
.../node_modules/@bufbuild/buf postinstall:       110,  32, 102, 111, 117, 110, 100,  32, 102, 111, 114,  32,
.../node_modules/@bufbuild/buf postinstall:        64,  98, 117, 102,  98, 117, 105, 108, 100,  47,  98, 117,
.../node_modules/@bufbuild/buf postinstall:       102,  45, 108, 105, 110, 117, 120,  45, 120,  54,  52,  64,
.../node_modules/@bufbuild/buf postinstall:        49,  46,  52,  55,
.../node_modules/@bufbuild/buf postinstall:       ... 256 more items
.../node_modules/@bufbuild/buf postinstall:     ]
.../node_modules/@bufbuild/buf postinstall:   ],
.../node_modules/@bufbuild/buf postinstall:   pid: 1660,
.../node_modules/@bufbuild/buf postinstall:   stdout: Buffer(0) [Uint8Array] [],
.../node_modules/@bufbuild/buf postinstall:   stderr: Buffer(356) [Uint8Array] [
.../node_modules/@bufbuild/buf postinstall:     110, 112, 109,  32, 101, 114, 114, 111, 114,  32,  99, 111,
.../node_modules/@bufbuild/buf postinstall:     100, 101,  32,  69,  84,  65,  82,  71,  69,  84,  10, 110,
.../node_modules/@bufbuild/buf postinstall:     112, 109,  32, 101, 114, 114, 111, 114,  32, 110, 111, 116,
.../node_modules/@bufbuild/buf postinstall:      97, 114, 103, 101, 116,  32,  78, 111,  32, 109,  97, 116,
.../node_modules/@bufbuild/buf postinstall:      99, 104, 105, 110, 103,  32, 118, 101, 114, 115, 105, 111,
.../node_modules/@bufbuild/buf postinstall:     110,  32, 102, 111, 117, 110, 100,  32, 102, 111, 114,  32,
.../node_modules/@bufbuild/buf postinstall:      64,  98, 117, 102,  98, 117, 105, 108, 100,  47,  98, 117,
.../node_modules/@bufbuild/buf postinstall:     102,  45, 108, 105, 110, 117, 120,  45, 120,  54,  52,  64,
.../node_modules/@bufbuild/buf postinstall:      49,  46,  52,  55,
.../node_modules/@bufbuild/buf postinstall:     ... 256 more items
.../node_modules/@bufbuild/buf postinstall:   ]
.../node_modules/@bufbuild/buf postinstall: }
.../node_modules/@bufbuild/buf postinstall: Node.js v20.18.0
.../node_modules/@bufbuild/buf postinstall: Failed
 ELIFECYCLE  Command failed with exit code 1.
Error: Process completed with exit code 1.

@igorlgt
Copy link

igorlgt commented Nov 14, 2024

Hi guys, we have same problem here. Do we have a date to fix it?

@timostamm
Copy link
Member

As a simple temporary workaround, use the following in your package.json:

  "@bufbuild/buf": "1.46.0",

Note that this version constraint does not use caret (as in ^1.46.0 ). With a caret, npm will try to install version 1.47.1, which is broken.

If you have a package-lock.json file in your repository, make sure to run npm install after this change, and commit the changes to both package.json and package-lock.json.

This should unblock you until we cut a release to fix the underlying issue with the latest release.

@timostamm
Copy link
Member

We've released version 1.47.2 to fix the issues ("unexpected version" error, missing buf-linux-x64 package).

You can update with the following command:

npm install @bufbuild/buf@latest

This will update the dependency in your package.json file to ^1.47.2 (with a caret, so you'll receive updates):

  "@bufbuild/buf": "^1.47.2"

It's also fine to manually make this change in package.json and run npm install.

@kio-nguyen
Copy link

Thank you for your effort @timostamm @doriable! It's live now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants