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

fix: print instructions even if installPackages fails #1110

Merged
merged 1 commit into from
May 25, 2022

Conversation

rozenmd
Copy link
Contributor

@rozenmd rozenmd commented May 25, 2022

Before:

 ⛅️ wrangler 0.0.0-3c7a216
---------------------------------------------------------------------
Using npm as package manager.
✨ Created quick-wins-init-1-1/wrangler.toml
Would you like to use git to manage this Worker? (y/n)
✨ Initialized git repository at quick-wins-init-1-1
No package.json found. Would you like to create one? (y/n)
✨ Created quick-wins-init-1-1/package.json
Would you like to use TypeScript? (y/n)
✨ Created quick-wins-init-1-1/tsconfig.json
Would you like to create a Worker at quick-wins-init-1-1/src/index.ts? (y/n)
✨ Created quick-wins-init-1-1/src/index.ts
npm ERR! code ETARGET
npm ERR! notarget No matching version found for wrangler@0.0.0-3c7a216.
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-05-25T15_44_20_140Z-debug-0.log

✘ [ERROR] Command failed with exit code 1: npm install @cloudflare/workers-types typescript --save-dev


If you think this is a bug then please create an issue at https://github.com/cloudflare/wrangler2/issues/new.

After:

 ⛅️ wrangler 0.0.0-a6430c0
---------------------------
Using npm as package manager.
✨ Created quick-wins-init5/wrangler.toml
Would you like to use git to manage this Worker? (y/n)
✨ Initialized git repository at quick-wins-init5
No package.json found. Would you like to create one? (y/n)
✨ Created quick-wins-init5/package.json
Would you like to use TypeScript? (y/n)
✨ Created quick-wins-init5/tsconfig.json
Would you like to create a Worker at quick-wins-init5/src/index.ts? (y/n)
✨ Created quick-wins-init5/src/index.ts
npm ERR! code ETARGET
npm ERR! notarget No matching version found for wrangler@0.0.0-a6430c0.
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-05-25T15_42_38_809Z-debug-0.log
✘ [ERROR] Command failed with exit code 1: npm install @cloudflare/workers-types typescript --save-dev



To start developing your Worker, run `cd quick-wins-init5 && npm start`
To publish your Worker to the Internet, run `npm run publish`

🚨 wrangler was unable to fetch your npm packages, but your project is ready to go

Closes #1109

@changeset-bot
Copy link

changeset-bot bot commented May 25, 2022

🦋 Changeset detected

Latest commit: c0d6f1a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
wrangler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented May 25, 2022

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.developers.workers.dev/runs/2385532490/npm-package-wrangler-1110

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/1110/npm-package-wrangler-1110

Or you can use npx with this latest build directly:

npx https://prerelease-registry.developers.workers.dev/runs/2385532490/npm-package-wrangler-1110 dev path/to/script.js

@rozenmd rozenmd force-pushed the catch-npm-errors branch from 42580fc to c0d6f1a Compare May 25, 2022 15:38
@rozenmd rozenmd marked this pull request as ready for review May 25, 2022 15:48
Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition. Could we avoid displaying the npm ERR lines?
Happy to land this as-is and iterate, since it is an improvement on what we had before.

@petebacondarwin petebacondarwin merged commit 515a52f into main May 25, 2022
@petebacondarwin petebacondarwin deleted the catch-npm-errors branch May 25, 2022 15:56
@github-actions github-actions bot mentioned this pull request May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants