Commit Graph

53 Commits

Author SHA1 Message Date
findseat
8775ff3fcf chore: fix some typos (#11397) 2024-04-09 20:51:35 +00:00
Dan Stowell
1b0d72aba5 [cli] Change vc env pull default output file to .env.local (#9892)
`vc deploy` ignores `.env.local`. To make sure we don't inadvertently
push people's secrets to source control, have all environment pulls
default to writing to `.env.local`.
2023-05-22 15:24:38 -07:00
Don Alvarez
10bc74904c [docs] Improve docs for @vercel/next no pages built message (#9494)
After many hours of debugging, I tracked down that having an old Node
version (eg 14.x) listed in your Vercel project settings can result in
the build step failing with a confusing and unhelpful error message
"`@vercel/next` No Serverless Pages Built". Note that this is a case
where it "can" cause it to fail, including with NextJS 13.1.6 and Vercel
CLI 28.16.2, but it is not guaranteed to fail. I have six NextJS
projects. They have identical next.config.js, tsconfig.json,
eslintrc.js, and .gitignore files, and other than a few seemingly
non-critical dependencies they have identical package.json files. Four
of the six consistently built and deployed in the cloud without issue.
Two consistently failed to build in the cloud. All built successfully
locally including using vercel build locally, and all would vercel
deploy --prebuilt successfully. Switching all the vercel cloud project
settings from Node 14.x to Node 18.x enabled all the projects to build
and deploy successfully in the vercel cloud without needing local vercel
build and local vercel deploy --prebuilt steps.

---------

Co-authored-by: Steven <steven@ceriously.com>
2023-02-21 11:32:03 -05:00
Steven
578a7742fe [next] Improve error message when routes-manifest.json not found (#9441)
The dashboard doesn't handle multiline errors very well because other lines are collapsed.

https://vercel.com/changelog/deployment-logs-filtering-now-available

<img width="1237" alt="image" src="https://user-images.githubusercontent.com/229881/218832497-0bcd9404-b4f5-49fe-9edd-bd6de6d8bb8f.png">


We also show the complete error in the top and it doesn't show newlines properly.

<img width="428" alt="image" src="https://user-images.githubusercontent.com/229881/218832603-065e0d4d-ae6e-4b44-b2db-b2fff063da58.png">

The "Learn More" link already has the relevant information so we can reduce this error message to a single line to improve the call to action.
2023-02-14 20:32:18 +00:00
Felix Haus
1d3f2b5a62 [build-utils][cli] Update link to project-configuration (#9439)
The link to the documentation has changed.
It is now available under https://vercel.com/docs/concepts/projects/project-configuration

This updates:
- link generation `https://vercel.com/docs/configuration#project/*` -> `https://vercel.com/docs/concepts/projects/project-configuration#*`
-  Updates test files
- Updates static references of https://vercel.com/docs/configuration across the repo
2023-02-14 16:44:24 +00:00
Bishal Shrestha
a4cfc5f943 [docs] Add troubleshooting step for no serverless pages error (#9333) 2023-02-03 15:23:20 -08:00
JJ Kasper
54aaab83aa [docs] Replace references to @now/next in error docs (#9331)
It's been long enough I think we can change these to refer to
`@vercel/next` instead.

x-ref: [slack
thread](https://vercel.slack.com/archives/C03DQ3QFV7C/p1674849801196389)
2023-01-27 16:59:42 -05:00
Andy McKay
71b9ac6976 Fix up some missing URLs (#8975)
### Related Issues

This fixes up a few links that had errors I found when scanning through
the code.

### 📋 Checklist

<!--
  Please keep your PR as a Draft until the checklist is complete
-->

#### Tests

- [ ] The code changed/added as part of this PR has been covered with
tests
- [ ] All tests pass locally with `yarn test-unit`

#### Code Review

- [ ] This PR has a concise title and thorough description useful to a
reviewer
- [ ] Issue from task tracker has a link to this PR
2022-11-25 10:47:11 -08:00
Andy McKay
686f78a86e [cli] Add in a message for deployment-error message (#8865)
We have a link to an error page here:
https://github.com/vercel/vercel/blob/main/packages/cli/src/commands/deploy/index.ts#L873,
however that page is currently a 404.

This is an attempt to explain the error a bit more. Because there are
many possible causes of a deployment error, this mostly focuses on
explaining how to get to the logs.

### Related Issues

Fixes https://github.com/vercel/vercel/issues/1732. 

### 📋 Checklist

<!--
  Please keep your PR as a Draft until the checklist is complete
-->

#### Tests

- [ ] The code changed/added as part of this PR has been covered with
tests
- [ ] All tests pass locally with `yarn test-unit`

#### Code Review

- [ ] This PR has a concise title and thorough description useful to a
reviewer
- [ ] Issue from task tracker has a link to this PR

Co-authored-by: Nathan Rajlich <n@n8.io>
Co-authored-by: Chris Barber <chris.barber@vercel.com>
2022-11-10 11:40:57 -06:00
Steven
bdefd0d05d [docs] Fix links to docs (#7668) 2022-04-12 07:52:12 -04:00
Lee Robinson
5bd0e0f6ca Update example to Eleventy 1.0. (#7313) 2022-01-17 18:54:21 -06:00
Nathan Rajlich
465129e62e [cli] Remove support for single file deployments (#6652)
Deploying a single file has printed a deprecation warning for a long time. Let's finally remove that behavior.
2021-12-08 19:45:06 +00:00
Steven
a8aa08600b [cli] Improve error docs for --scope (#6085) 2021-04-08 18:21:12 -04:00
Steven
09ff9cda9f [docs] Fix error message when credentials are missing (#5590) 2020-12-21 12:12:32 -08:00
Steven
eb8db25845 [cli] Remove v1 messages and docs (#5183)
We removed v1 support in [20.0.0](https://github.com/vercel/vercel/releases/tag/vercel%4020.0.0) so this PR removes the unused documentation, warning messages, etc.
2020-09-11 22:46:32 +00:00
Gianmarco
a9598d14e3 [docs] Fix typo in error message (#5141) 2020-09-08 16:48:52 -04:00
Andy
e016e38229 [cli] (Major) Change vc domains add workflow to match the dashboard (#3325)
* [now-cli] Change `now domains add` workflow to match dashboard

* Fix error throwing and add --force

* Remove `now domains verify`

* Count projects when removing a domain

* Include projects for `now inspect`

* Updated `now domains ls`

* Fix `now domains ls`

* Use Finally

* Add tests

* Use --force for domain tests

* Adjust tests

* Adjust test and fix output

* Fix padding

* Adjust more tests

* Ensure the project exists

* Log the deployment

* Fix tests again

* Remove project after test

* Fix command

* Fix test

* Change user after a couple of tests

* Add check

* Use random name for domain

* More logging

* Add more logging

* Remove logging

* Remove .now/project.json every time

* Skip test

* Add test to change user

* More logging

* Use now login

* Remove duplicated test

* Consider linked project for `domains add`

* Fix linting

* Remove unused docs

* Undo changes

* Undo more changes

* Fix typo

* Do not sort projects when there is only one record

* Fix loop

* Deploy with `-V 2`

* Remove verification

* Remove outdated link

* Update packages/now-cli/src/commands/domains/add.ts

Co-authored-by: Steven <steven@ceriously.com>

* Update packages/now-cli/src/commands/domains/add.ts

Co-authored-by: Steven <steven@ceriously.com>

* Use utils for public suffix and service type

* Update packages/now-cli/src/commands/domains/ls.ts

Co-authored-by: Steven <steven@ceriously.com>

* Update packages/now-cli/src/commands/domains/add.ts

Co-authored-by: Steven <steven@ceriously.com>

* Change link

* Undo test changes

* Fix type issues

* Update packages/now-cli/src/commands/domains/add.ts

Co-authored-by: Steven <steven@ceriously.com>

* Use domain config to print info

* Check apex domain when removing a domain

* Remove psl

* List projects when removing a domain

* Do not list projects

* Change user earlier

* Update packages/now-cli/src/commands/domains/inspect.ts

Co-authored-by: Steven <steven@ceriously.com>

* Apply suggestions from code review

Co-authored-by: Steven <steven@ceriously.com>

* Apply suggestions from code review

Co-authored-by: Steven <steven@ceriously.com>

Co-authored-by: Mark Glagola <mark.glagola@gmail.com>
Co-authored-by: Steven <steven@ceriously.com>
2020-07-23 15:41:25 +02:00
JJ Kasper
96565da1cf [next] Add shared lambdas opt-out for functions config (#4596)
As discussed this adds opting out of the shared lambdas optimization when a user adds a functions config in `now.json` or `vercel.json` since this could potentially be a breaking change. We plan to add new handling to still allow customizing this config for the combined lambdas that are created
2020-06-08 19:40:48 +00:00
JJ Kasper
65f0cc6797 De-experimentalize shared lambdas optimization by default (#4519)
As discussed this de-experimentalizes the shared lambdas optimization now that we have tested it, it also bails out of the optimization when a `now.json` or `vercel.json` is detected that contains legacy routes
2020-06-05 19:51:21 +00:00
Steven
56c8af51b2 [all] Rename GitHub repo to vercel/vercel (#4506)
We renamed the GitHub repository from `zeit/now` to `vercel/vercel` so this PR updates all references to the repo URL.

There were also a few remaining references to Now CLI that have been updated to Vercel CLI.
2020-05-28 12:06:42 -04:00
Joe Haddad
3ad2efeb74 [next] Update "Routes Manifest" Error (#4368)
This provides the user with additional troubleshooting steps.
2020-05-15 02:11:10 +00:00
Steven
6b52cfdbc7 [now-cli][now-client] Add support for vercel config files (#4234)
This PR renames the CLI and config files to `vercel`.

https://vercel.com/blog/zeit-is-now-vercel

### Complete
- [x] Help menus and error messages should print cli name from `package.json`
- [x] `now.json` => `vercel.json`
- [x] `.nowignore` => `.vercelignore`
- [x] `~/.now` => `~/.vercel`
- [x] `<project>/.now/project.json` => `<project>/.vercel/project.json`

### TODO
I'm going to do the remaining work in a follow-up PR:
- [ ] `<project>/.now/cache` => `<project>/.vercel/cache` (Runtimes sometimes use this)
- [ ] `NOW_*` special cased environment variables
- [ ] `*.now.sh` special cased url suffix
2020-05-05 14:58:05 -04:00
JJ Kasper
76f61cbbf0 [now-next] Provide a better error when failing to load routes-manifest (#4161)
This updates the error message shown when we fail to load the `routes-manifest` which appears to be happening most often when an incorrect output directory is configured for a Next.js application
2020-04-27 18:05:03 +00:00
Steven
28e01528c5 [all] Rename ZEIT Now to Vercel (#4112)
https://vercel.com/blog/zeit-is-now-vercel

Co-authored-by: Nathan Rajlich <n@n8.io>
2020-04-21 19:11:12 -04:00
Steven
867590a6ba [now-routing-utils] Fix validation for rewrite/redirect destination segments (#4105)
- Print an error instead of throwing when `destination` has segment not found in `source`
- Update docs to explain how to fix this error
- Add a couple tests
- Update uncaught `path-to-regexp` error message to print the full route that caused the error
2020-04-20 17:54:25 +00:00
Steven
9d0b0c6e41 [now-routing-utils] Fix error handling on path-to-regexp error (#3523)
This PR fixes an issue where certain patterns caused `path-to-regexp` to throw when it should be returning an error object. The fix is to make sure all inputs work properly with `path-to-regexp` before continuing.
2020-01-09 15:32:22 +00:00
Nathan Rajlich
847e538c69 [now-cli] Render an error message when the --token content is invalid (#3335)
Fixes #3334.

```
$ node ~/now-cli/dist/index.js --token $'he˚ll,o\n'
> Error! You defined "--token", but its contents are invalid. Must not contain: "\n", ",", "˚"
> More details: https://err.sh/now/invalid-token-value
```
2019-11-20 11:05:45 +00:00
Michel Moreau
b12ed4127e [docs] Update domain-verification error message (#3263)
Closes #3263.
2019-11-11 12:09:36 +01:00
Cam Smith
aea17f0c6f [now-cli] Add note for Windows environment variable syntax (#3243) 2019-11-11 12:08:47 +01:00
Nathan Rajlich
8a6f3c61bb Update links to now-builders repo to now repo (#2862)
* Update links to `now-builders` repo to `now` repo

Also copies over the `.md` files from the now-builders' `errors`
directory so that the https://err.sh links work correctly.

Part of #2782.

* Update `err.sh` links that were formerly `now-cli`

* Empty commit for CI

* Make CircleCI `run.sh` script a bit better

Before it would fail with exit code 1 if there were no matching modified
files because of the `grep` call failing without any `packages` prefixed
files.
2019-09-02 17:47:26 +02:00
Andy
7e3a5a7e2c [now dev] Allow now dev as package.json script (#2559)
* [now dev] Allow `now dev` as package.json script

* Fix absolute path for now dev

* Fix directory issue

* Typo

* Update src/commands/dev/dev.ts

Co-Authored-By: Nathan Rajlich <n@n8.io>

* Whitespace

* Make code simpler

* Extend type

* Update errors/now-dev-as-dev-script.md

Co-Authored-By: Nathan Rajlich <n@n8.io>

* Update errors/now-dev-as-dev-script.md

Co-Authored-By: Nathan Rajlich <n@n8.io>
2019-07-17 19:35:14 +02:00
Spellar Bot
4260b6c390 Fix a few typos in err.sh pages (#2311) 2019-05-03 13:22:33 -07:00
Timothy
d47591ccda Update missing-env-file.md (#2281)
* Update missing-env-file.md

* Update missing-env-file.md
2019-04-30 20:16:36 +02:00
Leo Lamprecht
18dc7cb3f4 Fixed error for .env and .env.build (#2261)
* Do not report env errors to Sentry

* Added guide for missing env file in dev mode

* Update errors/missing-env-file.md

Co-Authored-By: leo <mindrun@icloud.com>

* Update errors/missing-env-file.md

Co-Authored-By: leo <mindrun@icloud.com>
2019-04-29 14:59:37 +00:00
Leo Lamprecht
9341136f16 Added --scope flag and scope config property (#1939)
* Added basics for new --scope flag

* Fixed usage information

* Fixed integration test

* Fixed usage information about whoami

* Brought back missing whitespace

* Do not push scope property to API

* Ensure we're only reading local config in one place

* Fixed build

* Added test

* Made scope from config work

* Correctly handle error

* Handle Now errors too when loading local config

* Removed NowError

* Revert "Removed NowError"

This reverts commit cfeebc65251d3eb07f9aeb3e548af1d23c00a18e.

* Fixed CI

* Fixed final bug

* Do not consider switch command

* Made it work as expected

* Added test

* Added yet another test for the scope property

* Added space
2019-03-14 15:16:45 +00:00
Timothy
9e512690ff Add domain verification error document (#1806) 2019-01-07 23:00:40 +00:00
Bart Deslagmulder
56e1a37ae1 Updated error documentation about not nameservers (#1629) 2018-11-08 23:01:37 +01:00
Matheus Fernandes
2f07212e20 Added new iad1 data center (#1575) 2018-09-11 18:34:59 +02:00
Javi Velasco
6123df568c Restructure certs command (#1567)
* Restructure add command

* Remove cert start and finish

* Rename certs add to issue

* Better errors and add cant-solve-challenge

* Show err.sh for dns configuration errors generating certs

* Add err.sh to solve challenges manually

* Add deprecation message to certs add

* Improve grammar

* Minor fixes
2018-09-06 20:58:52 +02:00
Timothy
e03d036131 Add gru1 (#1545)
* Add gru1

* Add gru to errors

* Hard code sfo,bru scale

* Add --regions argument

* Push with console.log

* Scale to `bru`

* Scale down in bru only
2018-08-25 16:29:22 +01:00
Pranay Prakash
2c725b0360 Improvements to the CLI to handle slot specific flows (#1475)
* Handle scale slots error

* generate and send a requestID when verifying instantiation

* Don't compy incompatible scale settings

* deprecate BinaryDeployment

* add err.sh link

* swap cuid for uuid
2018-07-19 20:00:17 +02:00
Guillermo Rauch
eb746ae0f8 Updated error message about verification timeout 2018-05-15 10:04:38 +02:00
Javi Velasco
8ba2ae634f Refactor deploy events printing (#1302)
* Move deploy command to its own directory

* Do not show success on downscale message

* Move getDeploymentByIdOrHost to /util/deploy

* Remove unneeded parameter in getAppName

* Better types for copyToClipboard

* Update to babel 7

* Add generator utility functions

* Add function to get deployment events

* Finish  getDeploymentEvents after getting one state-change event

* Refactor deploy events and reduce verification timeout

* Reduce verification timeout for scale and alias

* Use output.log for success message in scale

* Fix integration tests
2018-04-16 19:36:36 -07:00
Guillermo Rauch
0e9a21a263 Support for globally distributed deployments (#1205)
* Introduce v3 deployment scaling API

* Less retries on setScale()

* now scale cmd v3

* Deployment id fixes

* bump `ecmaVersion` we lint against, to consider object rest spread

* move EPIPE workaround to the main file

* uniform exiting approach

* clean up list command to avoid globals, be simpler to read

* add ability to supply a custom API version to `now.list()` helper

* upgrade babel toolchain

* introduce `arg`, which will incrementally replace `mri`

* global args accepted by all subcommands

* update lock

* fix `>` to be red when rendering errors

* use new output helpers by @tootallnate

* make object spread work

* bump flow webpack plugin

* lock

* revert to ava 0.25.x

* deprecate `now ls help` since an app could be named `help`

* validate number of arguments

* Fixed integration tests to match downgraded AVA

* Trimmed newline

* WIP

* whitespace fix

* add source map support by @timneutkens

* fix source maps paths

* remove sort-deployments util. it only considers `package.json`

* created -> age for consistency

* remove sorting what wasn't working well

* multiple improvements and simplifications

* improve rendering of urls, fix filtering by app

* only attempt to fetch instances if we have a count > 0

* better check for no deployments

* add instance lists if --all is supplied

* prevent the `.map` file from being included by pkg

* Store artifacts in Circle CI

* adapt INITIALIZING display by suggestion of @tootallnate

* Nothing to return

* now scale: Args parsing and remove ls

* various code improvements, error link for deprecation of `now scale ls`

* improve help

* make error more specific to deployment

* use new error output utilities for `now deploy`

* make some requires conditional

* default command style fix

* add reusable dc validation and normalization utilities

* start doing dc / region validation in scale

* refactor deploy to use reusable dc / region utils

* add slug support for warn util

* add success helper

* improve `scale` command

* add `responseErrorMessage` helper

* add `now.fetch()` helper

* remove console.log

* tweak output

* draft of verification step

* better errors

* implement (customizable) verification timeout

* bump now-host api to v3

* finish verification

* improve verification and sanitization

* improve copy

* fix ctrl+c during scale

* fix max scale in the absense of max

* improved rules saving

* fix listing the context you're running `now list` under

* add context name to list commands from slots

* improve --no-verify

* add 'elapsed' utility to print out the elapsed time nicely

* add per-dc timers

* improve debug helper to save date, improve time helper to log eagerly

* log every request, automatically

* tweak

* general tweaks to `now deploy`

* pass additional now config fields

* refactor `now rm`

* begin `inspect` command

* bump fetch-h2

* nearly complete new inspect command

* add `(dev)` to --version while in development

* fix 404 error if app is not matched

* improve scaling

* pass event types to the events endpoint

* fix file uploads

* fix passing a deployment hostname with trailing `/`

* fetch events only for non-static

* include uid in inspect

* finish up events

* reduce one indent by recommendation of @leo

* fix debugging for `now ls`

* Always return and exit at top-level in now.js

* improved scale message

* more elegant way of exiting, allowing for resource cleanup & faster

* flowify

* fix strange error which happens when orderly cleanup is done

* flow

* flow fix

* invoke now.close()

* improve list indentation

* refactor alias

* exit clean

* improve fallthrough entry in path alias

* make scale exit properly

* fix closing agent for inspection

* add type of deployment to ls

* better error handling of 403

* improve list style

* various algorithmic improvements

* Certificates refactor to consume the new API (#1210)

* Adapt cert command to the new api

* Use the new certs api for cert command

* Console log certs table and point to the right endpoint

* Remove unused certs client file

* Refactor certs commands

* Fix access to args

* Always close client

* Refactor alias (#1216)

* remove unnecessary file

* reads events from /deployment/:id/events endpoint (#1219)

* add polling (#1220)

* add polling

* hack to prevent partial json to be unluckily parsed in _flush

* cleanupAndResolveCalled to prevent running twice

* call onOpen only of going to 'log'. also call from cleanup

* callOnOpenOnce, don't reject on stream error, polling to finish

* fix eraseLines, make cleanup routine reject

* remove build-logger.js

* restored printEvent from deleted build-logger.js

* print locations of instance events

* bump api versions

* Switch now logs to events endpoint (#1223)

* move eraseLines to onRetry. show error in onRetry

* move printEvents to 'sh/util/events.js'

* use printEvents in `now logs` command

* pass printEvent to events.js

* make both follow and non-follow modes work

* remove socket.io

* improve logs command

* clarify team context

* Refactor alias

* Use ellapsed util in stamp

* use v3

* Refactor alias (#1224)

* Refactor alias

* Use ellapsed util in stamp

* Improvements

* Fix unit tests

* Ensure body exists when copying error attrs

* Add hook to close socket and wait message on process exit

* More retries when verifying the DNS records in alias

* Remove nowExit event listener on close

* Add remaning DCs message right away on alias

* Consistent timestamp when creating a deployment + scale dcs

* Ignore flow error

* Remove not needed now.close from alias

* Remove not needed now.close from inspect

* Bugfix: bind context to close socket handler

* Better error handling for scale command

* Now logs limit (#1226)

* restored -n LIMIT cli arg

* show date in format usabe for since and until

* pass direction and limit to endpoint

* implement follow mode after backwards slice

* add query, fix linefeeds, strip term commands

* implement head argument

* better logs default

* logs: fix -o raw mode, fix all mode

* Add verification for deploy

* Run integration tests using random email address

* Fix flow errors

* Fix wrong scale check

* Finish deploy on state READY

* Correct URL parsing

* Bumped Node.js to the latest version

* Output node version

* fix url display

* Returned URLs

* Improve messages in scale

* Clear URLs

* Strip ANSI codes

* Better logging messages for deploy

* Print ls to console instead of stderr

* Add create certificate certificate and ensure verification is done for a domain

* Write success in alias to stdout

* clearURL in stdout for alias test

* Update scale integration test

* Use stdout for scale success message

* Write alias rm response to stdout

* Refactor alias rm to use fetch from now client

* Fix tests
2018-04-03 08:14:41 -07:00
Bart Deslagmulder
c025aa7596 Fix typos (#1208) 2018-03-27 16:55:10 -07:00
Naoyuki Kanezawa
6e48216234 Added support for multiple regions (#1191) 2018-03-16 14:06:21 -07:00
Guillermo Rauch
a63cb28723 Improved error for environment variable type (#1135) 2018-02-24 19:34:25 -08:00
Tim Neutkens
a6af5c8696 Error explanation for unauthorized domain access (#1059) 2018-01-14 14:39:51 +01:00
Tim Neutkens
0d8b4a8386 Catch path alias scaling (#1057)
* Catch path alias scaling

* Better wording

* Fix grammar mistake
2018-01-14 14:39:39 +01:00
Nathan Rajlich
dc4327e883 Fix location of credentials files on error page (#995) 2017-11-18 17:02:18 -08:00