workers-sdk icon indicating copy to clipboard operation
workers-sdk copied to clipboard

🐛 BUG: Preview builds are broken

Open rozenmd opened this issue 2 years ago • 3 comments

What version of Wrangler are you using?

2.1.13

What operating system are you using?

Mac

Describe the Bug

When you create a PR, and the bot drops a comment with links to your preview artifacts, npx doesn't seem to be able to pick them up:

% npx https://prerelease-registry.developers.workers.dev/runs/3054372461/npm-package-wrangler-1856 whoami
Need to install the following packages:
  [email protected]
Ok to proceed? (y) y
npm ERR! code ETARGET
npm ERR! notarget No matching version found for [email protected].
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/rozenmd/.npm/_logs/2022-09-14T16_22_36_931Z-debug-0.log

Which is weird, since that URL resolves with a file...

rozenmd avatar Sep 14 '22 16:09 rozenmd

Yeah I think I have seen this. You have to install it locally first, I think. Then it will work. I.e.

npm i -D https://prerelease-registry.developers.workers.dev/runs/3054372461/npm-package-wrangler-1856
npx wrangler whoami

petebacondarwin avatar Sep 14 '22 16:09 petebacondarwin

Thing is, it used to work without needing an install (I have a screencap of it working back in early June) 😬

rozenmd avatar Sep 14 '22 16:09 rozenmd

Different version of npm?

petebacondarwin avatar Sep 14 '22 21:09 petebacondarwin

I installed nvm over the top of volta and now npx works again. Weird.

rozenmd avatar Dec 02 '22 11:12 rozenmd