diff --git a/errors/deploy-invalid-dc.md b/errors/deploy-invalid-dc.md index 4a6e86f56..e3c111355 100644 --- a/errors/deploy-invalid-dc.md +++ b/errors/deploy-invalid-dc.md @@ -2,8 +2,8 @@ #### Why This Error Occurred -When supplying `regions` or `scale` settings, you -used an unknown or invalid dc identifier. +When supplying `regions` configuration, you +used an unknown or invalid DC identifier. #### Possible Ways to Fix It @@ -19,7 +19,7 @@ and DCs have to be in _lowercase_. - `gru` - `iad` -In `now-cli`, they currently are transformed to +In Vercel CLI, they currently are transformed to DC identifiers before being sent to our APIs. **Valid DC identifiers**: diff --git a/errors/missing-dotenv-target.md b/errors/missing-dotenv-target.md deleted file mode 100644 index bfbe710a4..000000000 --- a/errors/missing-dotenv-target.md +++ /dev/null @@ -1,9 +0,0 @@ -# Missing `--dotenv` Target - -#### Why This Error Occurred - -You specified a path as the value for the `--dotenv` flag, but the target of the path doesn't exist. - -#### Possible Ways to Fix It - -Make sure the target file you've specified exists and is readable by Vercel CLI. In addition, please ensure that the filename starts with a dot (example: `.env`) - then it should work. diff --git a/errors/regions-and-scale-at-once.md b/errors/regions-and-scale-at-once.md deleted file mode 100644 index 136fb3cf8..000000000 --- a/errors/regions-and-scale-at-once.md +++ /dev/null @@ -1,32 +0,0 @@ -# Can't Set `regions` and `scale` Options Simultaneously - -#### Why This Error Occurred - -Your deployment's configuration contains a `regions` and `scale` -configuration simultaneously. - -#### Possible Ways to Fix It - -The `regions` setting is intended to be used to scale the -deployment to the supplied regions or datacenters identifiers -with default scale settings. - -```json -{ - "regions": ["sfo", "bru", "gru", "iad"] -} -``` - -The `scale` object allows you to be more granular: you can decide a -`min` and `max` number of instances per region: - -```json -{ - "scale": { - "sfo": { "min": 0, "max": 10 } - } -} -``` - -To solve this problem, use only one of the two ways of deciding -where to scale your deployment to. diff --git a/errors/scale-invalid-dc.md b/errors/scale-invalid-dc.md deleted file mode 100644 index e0b95b0e7..000000000 --- a/errors/scale-invalid-dc.md +++ /dev/null @@ -1,36 +0,0 @@ -# Invalid Region or DC Identifier - -#### Why This Error Occurred - -When supplying a region or DC identifier in `vercel scale`, -we weren't able to recognize the value as valid. - -#### Possible Ways to Fix It - -Check your `vercel scale` command make sure you are using a -valid string after the URL. Regions -and DCs have to be in _lowercase_. - -**Valid region identifiers**: - -- `all` (special, used to scale to all DCs, can only appear once) -- `sfo` -- `bru` -- `gru` -- `iad` - -In Vercel CLI, they currently are transformed to -DC identifiers before being sent to our APIs. - -**Valid DC identifiers**: - -- `sfo1` -- `bru1` -- `gru1` -- `iad1` - -To pass multiple ones, use a comma: - -``` -vercel scale my-url-123.now.sh sfo,bru,gru 1 5 -``` diff --git a/errors/scale-ls.md b/errors/scale-ls.md deleted file mode 100644 index 0a564c167..000000000 --- a/errors/scale-ls.md +++ /dev/null @@ -1,30 +0,0 @@ -# `vercel scale ls` is deprecated - -#### Why This Error Occurred - -We have stopped supporting this command, in favor of -better alternatives. - -`vercel scale ls` used to list all the scaling rules -for all your deployments. The output would be too long, -and it would often be hard to find the information -you needed in a long list of items. - -#### Possible Ways to Fix It - -Instead of using `vercel scale ls` to list all your deployments -and their scaling rules, first use `vercel ls` to find -your deployment: - -```console -vercel ls -``` - -Then, select the URL of your deployment, which uniquely identifies it, and run: - -```console -vercel inspect my-deployment-12345.now.sh -``` - -The `inspect` subcommand will give you your deployment's scale information, including what datacenters it's enabled on, the -current number of instances and minimums/maximums. diff --git a/errors/scaling-path-alias.md b/errors/scaling-path-alias.md deleted file mode 100644 index 522bf1f8d..000000000 --- a/errors/scaling-path-alias.md +++ /dev/null @@ -1,12 +0,0 @@ -# Scaling path alias - -#### Why This Error Occurred - -You tried to use `vercel scale` on a path alias (`vercel alias -r rules.json`). - -#### Possible Ways to Fix It - -Path aliases are routes to instances. Instances can be scaled independent from each other. -You can view path aliases by running `vercel alias ls `. - -Documentation for Path Aliases can be found [here](https://vercel.com/docs/features/path-aliases). diff --git a/errors/v2-no-min.md b/errors/v2-no-min.md deleted file mode 100644 index ccfc6b0bd..000000000 --- a/errors/v2-no-min.md +++ /dev/null @@ -1,16 +0,0 @@ -# No minimum scale settings on Cloud v2 deployments - -#### Why This Error Occurred - -An attempt was made at scaling a Cloud v2 deployment with a `min` scale -setting. This isn't supported yet. - -#### Possible Ways to Fix It - -Ensure your scale settings (in `vercel.json`, the command you're running -or from a previous deployment who's alias you're trying to overwrite) has -the `min` scale setting set to `0`. You can do this by running - -``` -vercel scale 0 10 -``` diff --git a/errors/verification-timeout.md b/errors/verification-timeout.md deleted file mode 100644 index 11fea0b87..000000000 --- a/errors/verification-timeout.md +++ /dev/null @@ -1,29 +0,0 @@ -# Verification Timeout - -#### Why This Error Occurred - -After the deployment build completed and the deployment state was set to `READY`, -instances failed to initialize properly. - -The CLI attempted to verify that the scale settings of your instances matched, -but it couldn't do so within the allotted time (defaults to 2 minutes). - -#### Possible Ways to Fix It - -Instance verification is the process of ensuring that after -your deployment is ready, we can actually run (instantiate) your code. - -If you configured [regions or scale](https://vercel.com/docs/features/scaling), -we ensure the minimums and maximums are met for the regions you enabled. - -If you think your code is taking too long to instantiate, this can be due -to slow boot up times. You can supply `--no-verify` to skip verification -if you are confident your code runs properly. - -If your application is not listening on a HTTP port, we might be failing to -instantiate your deployment as well. It might not be showing any errors, -but the deployment instance is effectively not routable and cannot be -verified. - -If your instances are crashing before an HTTP port is exposed, verification -will fail as well. Double check your logs (e.g.: by running `vercel logs `) diff --git a/packages/now-cli/src/commands/alias/set.ts b/packages/now-cli/src/commands/alias/set.ts index 664c77093..cf8e1b52b 100644 --- a/packages/now-cli/src/commands/alias/set.ts +++ b/packages/now-cli/src/commands/alias/set.ts @@ -96,7 +96,7 @@ export default async function set( return 1; } - // For `now alias set ` + // For `vercel alias set ` if (args.length === 1) { const deployment = handleCertError( output, @@ -261,7 +261,7 @@ function handleSetupDomainError( { extraSpace: ' ' } )}\n\n` ); - output.print(' Read more: https://err.sh/now/domain-verification\n'); + output.print(' Read more: https://err.sh/vercel/domain-verification\n'); return 1; } diff --git a/packages/now-cli/src/commands/certs/issue.ts b/packages/now-cli/src/commands/certs/issue.ts index 7025bd1e7..ab105605e 100644 --- a/packages/now-cli/src/commands/certs/issue.ts +++ b/packages/now-cli/src/commands/certs/issue.ts @@ -75,7 +75,7 @@ export default async function issue( } if (crtPath || keyPath || caPath) { - if (args.length !== 0 || (!crtPath || !keyPath || !caPath)) { + if (args.length !== 0 || !crtPath || !keyPath || !caPath) { output.error( `Invalid number of arguments to create a custom certificate entry. Usage:` ); @@ -230,6 +230,8 @@ async function runStartOrder( output.print( ` ${chalk.cyan(getCommandName(`certs issue ${cns.join(' ')}`))}\n` ); - output.print(' Read more: https://err.sh/now/solve-challenges-manually\n'); + output.print( + ' Read more: https://err.sh/vercel/solve-challenges-manually\n' + ); return 0; } diff --git a/packages/now-cli/src/commands/deploy/args.js b/packages/now-cli/src/commands/deploy/args.js index 7c5c14950..62fd0e0a6 100644 --- a/packages/now-cli/src/commands/deploy/args.js +++ b/packages/now-cli/src/commands/deploy/args.js @@ -1,7 +1,5 @@ import chalk from 'chalk'; import logo from '../../util/output/logo'; -import code from '../../util/output/code'; -import note from '../../util/output/note'; import { getPkgName } from '../../util/pkg-name.ts'; export const help = () => ` @@ -70,12 +68,6 @@ export const help = () => ` --prod Create a production deployment -c, --confirm Confirm default options and skip questions - ${note( - `To view the usage information for Now 1.0, run ${code( - `${getPkgName()} help deploy-v1` - )}` - )} - ${chalk.dim('Examples:')} ${chalk.gray('–')} Deploy the current directory diff --git a/packages/now-cli/src/commands/deploy/latest.js b/packages/now-cli/src/commands/deploy/latest.js index 622c27b13..b3873ea88 100644 --- a/packages/now-cli/src/commands/deploy/latest.js +++ b/packages/now-cli/src/commands/deploy/latest.js @@ -104,7 +104,7 @@ const printDeploymentStatus = async ( if (readyState !== 'READY') { output.error( - `Your deployment failed. Please retry later. More: https://err.sh/now/deployment-error` + `Your deployment failed. Please retry later. More: https://err.sh/vercel/deployment-error` ); return 1; } @@ -247,11 +247,6 @@ export default async function main( const { isFile, path } = pathValidation; const autoConfirm = argv['--confirm'] || isFile; - // --no-scale - if (argv['--no-scale']) { - warn(`The option --no-scale is only supported on Now 1.0 deployments`); - } - // deprecate --name if (argv['--name']) { output.print( diff --git a/packages/now-cli/src/commands/dev/index.ts b/packages/now-cli/src/commands/dev/index.ts index 153993884..0aa16928b 100644 --- a/packages/now-cli/src/commands/dev/index.ts +++ b/packages/now-cli/src/commands/dev/index.ts @@ -99,7 +99,7 @@ export default async function main(ctx: NowContext) { 'package.json' )} must not contain ${cmd('now dev')}` ); - output.error(`Learn More: http://err.sh/now/now-dev-as-dev-script`); + output.error(`Learn More: http://err.sh/vercel/now-dev-as-dev-script`); return 1; } if (scripts && scripts.dev && /\bvercel\b\W+\bdev\b/.test(scripts.dev)) { @@ -108,7 +108,7 @@ export default async function main(ctx: NowContext) { 'package.json' )} must not contain ${cmd('vercel dev')}` ); - output.error(`Learn More: http://err.sh/now/now-dev-as-dev-script`); + output.error(`Learn More: http://err.sh/vercel/now-dev-as-dev-script`); return 1; } } diff --git a/packages/now-cli/src/util/certs/handle-cert-error.ts b/packages/now-cli/src/util/certs/handle-cert-error.ts index 0ba9fe584..5138e8c4e 100644 --- a/packages/now-cli/src/util/certs/handle-cert-error.ts +++ b/packages/now-cli/src/util/certs/handle-cert-error.ts @@ -67,13 +67,15 @@ export default function handleCertError( output.print( ` ${getCommandName(`certs issue --challenge-only `)}\n` ); - output.print(' Read more: https://err.sh/now/dns-configuration-error\n'); + output.print( + ' Read more: https://err.sh/vercel/dns-configuration-error\n' + ); } else { output.print( ` We configured them for you, but the propagation may take a few minutes. Please try again later.\n` ); output.print( - ' Read more: https://err.sh/now/dns-configuration-error\n\n' + ' Read more: https://err.sh/vercel/dns-configuration-error\n\n' ); } return 1; diff --git a/packages/now-cli/src/util/errors-ts.ts b/packages/now-cli/src/util/errors-ts.ts index 2bfe1fb21..1c4837022 100644 --- a/packages/now-cli/src/util/errors-ts.ts +++ b/packages/now-cli/src/util/errors-ts.ts @@ -999,7 +999,7 @@ export class MissingDotenvVarsError extends NowError< ].join('\n'); } - message += '\nRead more: https://err.sh/now/missing-env-file'; + message += '\nRead more: https://err.sh/vercel/missing-env-file'; super({ code: 'MISSING_DOTENV_VARS', diff --git a/packages/now-cli/src/util/index.js b/packages/now-cli/src/util/index.js index 9abfb57d6..c9d6a9651 100644 --- a/packages/now-cli/src/util/index.js +++ b/packages/now-cli/src/util/index.js @@ -186,7 +186,7 @@ export default class Now extends EventEmitter { const { key } = error; err.message = `The env key ${key} has an invalid type: ${typeof env[key]}. ` + - 'Please supply a String or a Number (https://err.sh/now-cli/env-value-invalid-type)'; + 'Please supply a String or a Number (https://err.sh/vercel-cli/env-value-invalid-type)'; } else if (code === 'unreferenced_build_specifications') { const count = unreferencedBuildSpecs.length; const prefix = count === 1 ? 'build' : 'builds'; diff --git a/packages/now-cli/src/util/output/create-output.ts b/packages/now-cli/src/util/output/create-output.ts index 85c05d250..a755c277a 100644 --- a/packages/now-cli/src/util/output/create-output.ts +++ b/packages/now-cli/src/util/output/create-output.ts @@ -33,7 +33,7 @@ export default function createOutput({ debug: debugEnabled = false } = {}) { boxen?: boxen.Options; } ) { - const details = slug ? `https://err.sh/now/${slug}` : link; + const details = slug ? `https://err.sh/vercel/${slug}` : link; print( boxen( @@ -66,7 +66,7 @@ export default function createOutput({ debug: debugEnabled = false } = {}) { action = 'Learn More' ) { print(`${chalk.red(`Error!`)} ${str}\n`); - const details = slug ? `https://err.sh/now/${slug}` : link; + const details = slug ? `https://err.sh/vercel/${slug}` : link; if (details) { print(`${chalk.bold(action)}: ${renderLink(details)}\n`); } diff --git a/packages/now-cli/src/util/output/error.ts b/packages/now-cli/src/util/output/error.ts index a746fa909..bc4e74df2 100644 --- a/packages/now-cli/src/util/output/error.ts +++ b/packages/now-cli/src/util/output/error.ts @@ -10,7 +10,7 @@ export default function error(...input: string[] | [APIError]) { if (typeof input[0] === 'object') { const { slug, message, link, action = 'Learn More' } = input[0]; messages = [message]; - const details = slug ? `https://err.sh/now/${slug}` : link; + const details = slug ? `https://err.sh/vercel/${slug}` : link; if (details) { messages.push(`${chalk.bold(action)}: ${renderLink(details)}`); }