question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to use "alias" field in now.json the first time we deploy

See original GitHub issue

On a new project, if we include "alias": "www.my-site.com", running npx now gives this error:

> Error! Unexpected error. Please try again later. ()

If we remove the "alias" field, it works fine and it builds the project.

If we include "alias" back again after the first build, it works fine.

ezgif com-video-to-gif (3)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
AndyBitzcommented, Sep 18, 2019

@luisherranz @SantosGuillamot Thank you for providing the debug information.

The reason why this error occures is that the deployment is the first deployment of this project. We will automatically promote the first deployment of a project to target=production.

So we tried to verify the alias, that failed because it is not a domain you own.

We further improved the error message.

2reactions
SantosGuillamotcommented, Sep 9, 2019

I have tried it again and it’s still happening. This is the output after using the --debug flag, let me know if you need anything else:

[Woronas-iMac:new-test-now mario$ npx now --debug [debug] [2019-09-09T07:32:46.736Z] Found config in file /Users/mario/Desktop/Code/new-test-now/now.json [debug] [2019-09-09T07:32:46.745Z] Using Now CLI 16.2.0 [debug] [2019-09-09T07:32:46.746Z] user supplied no target, defaulting to deploy [debug] [2019-09-09T07:32:46.757Z] GET https://api.zeit.co/www/user [debug] [2019-09-09T07:32:46.757Z] Total requests made on socket #1: 1 [debug] [2019-09-09T07:32:46.757Z] Concurrent requests on socket #1: 1 [debug] [2019-09-09T07:32:47.484Z] GET https://api.zeit.co/www/user : 726.655ms Deploying ~/Desktop/Code/new-test-now under santosguillamot Using project new-name-now [debug] [2019-09-09T07:32:47.506Z] Getting files [debug] [2019-09-09T07:32:47.509Z] Locating files /Users/mario/Desktop/Code/new-test-now [debug] [2019-09-09T07:32:47.511Z] Ignoring /Users/mario/Desktop/Code/new-test-now/node_modules [debug] [2019-09-09T07:32:47.513Z] Locating files /Users/mario/Desktop/Code/new-test-now: 3.856ms [debug] [2019-09-09T07:32:47.513Z] Getting files: 7.432ms [debug] [2019-09-09T07:32:47.514Z] Computing hashes [debug] [2019-09-09T07:32:47.527Z] Computing hashes: 12.270ms [debug] [2019-09-09T07:32:47.529Z] Get files ready for deployment [debug] [2019-09-09T07:32:47.529Z] Get files ready for deployment: 0.490ms [debug] [2019-09-09T07:32:47.530Z] POST https://api.zeit.co/v9/now/deployments {“version”:2,“env”:{},“build”:{“env”:{}},“name”:“new-name-now”,“files”:[{“sha”:“8be265578bfc713b7b16fd7e1e7e261009d15de8”,“size”:3211,“file”:“build/static/list.es5.212d7a8d852b287972e9.js”,“mode”:33188},{“sha”:“07aa7c45b94ff75b38b48bd153ded497451affb1”,“size”:3152,“file”:“build/static/list.module.811982a2b95774897d32.js”,“mode”:33188},{“sha”:“9a23dd86fd7d6f97f6f65d374ddefc9bbca6d631”,“size”:1203,“file”:“favicon.ico”,“mode”:33188},{“sha”:“dc7b397576d66295a8b3df89880cf6f217c562d9”,“size”:1141,“file”:“frontity.settings.js”,“mode”:33188},{“sha”:“89920bebe42d7dff24f837b2bc1471a69b2f49ff”,“size”:165,“file”:“now.json”,“mode”:33188},{“sha”:“ff17c5d6012be7862575f7729655d376598cacc9”,“size”:520,“file”:“package.json”,“mode”:33188},{“sha”:“e1d93beb319d57189e7a951b03895efbeadf993f”,“size”:675,“file”:“packages/mars-theme/package.json”,“mode”:33188},{“sha”:“aa3a278a036181cc285fb86af963538d4383230a”,“size”:1055,“file”:“packages/mars-theme/src/components/featured-media.js”,“mode”:33188},{“sha”:“a46c10d1a71c2c715b5ad9c38508c5ee13fa4558”,“size”:817,“file”:“packages/mars-theme/src/components/header.js”,“mode”:33188},{“sha”:“71383f1237293b5a28f9e4589b09af1f8f3b6357”,“size”:1433,“file”:“packages/mars-theme/src/components/index.js”,“mode”:33188},{“sha”:“8d5140fd34bec7a8362e6e89cccabc76c124e682”,“size”:502,“file”:“packages/mars-theme/src/components/link.js”,“mode”:33188},{“sha”:“3ea7719328c903061bb638a220c1acf08c141487”,“size”:178,“file”:“packages/mars-theme/src/components/list/index.js”,“mode”:33188},{“sha”:“9a4d98485485dedc5fde4a4020afe820dd2a6016”,“size”:1372,“file”:“packages/mars-theme/src/components/list/list-item.js”,“mode”:33188},{“sha”:“ebc428e63b0cd435e57673914e762c5275d999a0”,“size”:1202,“file”:“packages/mars-theme/src/components/list/list.js”,“mode”:33188},{“sha”:“4743fcb27df36d6e2707956f6f142e7578ed09d3”,“size”:1205,“file”:“packages/mars-theme/src/components/list/pagination.js”,“mode”:33188},{“sha”:“6cea1bd6d3b9afdaaf5db119235bd216ecd9c448”,“size”:502,“file”:“packages/mars-theme/src/components/loading.js”,“mode”:33188},{“sha”:“35c74d24494e57b7529bbc296b3b6d9dda1e89a9”,“size”:1025,“file”:“packages/mars-theme/src/components/nav.js”,“mode”:33188},{“sha”:“531fd664deaadc2ed75f27a8695b67b01c3c8dd8”,“size”:665,“file”:“packages/mars-theme/src/components/page404.js”,“mode”:33188},{“sha”:“a1776bec650f1d497ee78039b44a8d312120894a”,“size”:2942,“file”:“packages/mars-theme/src/components/post.js”,“mode”:33188},{“sha”:“2e0e6a7316853858f0e6ed692a90486a40408291”,“size”:585,“file”:“packages/mars-theme/src/index.js”,“mode”:33188},{“sha”:“8b1c2cb8e500b5c1fe63be1e37ff8e405eb4c096”,“size”:9186,“file”:“packages/mars-theme/CHANGELOG.md”,“mode”:33188},{“sha”:“fcb530875241aed0c301db7b3386dde88251ce68”,“size”:11345,“file”:“packages/mars-theme/LICENSE”,“mode”:33188},{“sha”:“61efe135653256c9295b978f18ab2360739c3866”,“size”:264214,“file”:“build/static/new-test-now.module.c347eed7f62f8e92a8a7.js”,“mode”:33188},{“sha”:“ab3558a994644367b02cbc9b1b687c85d1964624”,“size”:293401,“file”:“build/analyze/module-production.html”,“mode”:33188},{“sha”:“043959a6c800a45e027f8de27b44a2c4b497badd”,“size”:274044,“file”:“package-lock.json”,“mode”:33188},{“sha”:“df13bf8732def0c22fdf760fc5f06b68ea7f26d3”,“size”:352530,“file”:“build/analyze/es5-production.html”,“mode”:33188},{“sha”:“6d9b925a21dc342e6993b5789b47600c3f698544”,“size”:365594,“file”:“build/analyze/server-production.html”,“mode”:33188},{“sha”:“3cf2ea2f8a4c21820632b991cba475a1fa250bbc”,“size”:381939,“file”:“build/static/new-test-now.es5.d7608939ebaa3f2269db.js”,“mode”:33188},{“sha”:“464e9c5b8a528895431f95e2b727e889cd65ee6f”,“size”:721275,“file”:“build/server.js”,“mode”:33188}],“meta”:{},“alias”:“www.your-site.com”,“builds”:[{“src”:“package.json”,“use”:“@frontity/now”}]} [debug] [2019-09-09T07:32:47.530Z] Total requests made on socket #1: 1 [debug] [2019-09-09T07:32:47.530Z] Concurrent requests on socket #1: 1 [debug] [2019-09-09T07:32:48.332Z] POST https://api.zeit.co/v9/now/deployments {“version”:2,“env”:{},“build”:{“env”:{}},“name”:“new-name-now”,“files”:[{“sha”:“8be265578bfc713b7b16fd7e1e7e261009d15de8”,“size”:3211,“file”:“build/static/list.es5.212d7a8d852b287972e9.js”,“mode”:33188},{“sha”:“07aa7c45b94ff75b38b48bd153ded497451affb1”,“size”:3152,“file”:“build/static/list.module.811982a2b95774897d32.js”,“mode”:33188},{“sha”:“9a23dd86fd7d6f97f6f65d374ddefc9bbca6d631”,“size”:1203,“file”:“favicon.ico”,“mode”:33188},{“sha”:“dc7b397576d66295a8b3df89880cf6f217c562d9”,“size”:1141,“file”:“frontity.settings.js”,“mode”:33188},{“sha”:“89920bebe42d7dff24f837b2bc1471a69b2f49ff”,“size”:165,“file”:“now.json”,“mode”:33188},{“sha”:“ff17c5d6012be7862575f7729655d376598cacc9”,“size”:520,“file”:“package.json”,“mode”:33188},{“sha”:“e1d93beb319d57189e7a951b03895efbeadf993f”,“size”:675,“file”:“packages/mars-theme/package.json”,“mode”:33188},{“sha”:“aa3a278a036181cc285fb86af963538d4383230a”,“size”:1055,“file”:“packages/mars-theme/src/components/featured-media.js”,“mode”:33188},{“sha”:“a46c10d1a71c2c715b5ad9c38508c5ee13fa4558”,“size”:817,“file”:“packages/mars-theme/src/components/header.js”,“mode”:33188},{“sha”:“71383f1237293b5a28f9e4589b09af1f8f3b6357”,“size”:1433,“file”:“packages/mars-theme/src/components/index.js”,“mode”:33188},{“sha”:“8d5140fd34bec7a8362e6e89cccabc76c124e682”,“size”:502,“file”:“packages/mars-theme/src/components/link.js”,“mode”:33188},{“sha”:“3ea7719328c903061bb638a220c1acf08c141487”,“size”:178,“file”:“packages/mars-theme/src/components/list/index.js”,“mode”:33188},{“sha”:“9a4d98485485dedc5fde4a4020afe820dd2a6016”,“size”:1372,“file”:“packages/mars-theme/src/components/list/list-item.js”,“mode”:33188},{“sha”:“ebc428e63b0cd435e57673914e762c5275d999a0”,“size”:1202,“file”:“packages/mars-theme/src/components/list/list.js”,“mode”:33188},{“sha”:“4743fcb27df36d6e2707956f6f142e7578ed09d3”,“size”:1205,“file”:“packages/mars-theme/src/components/list/pagination.js”,“mode”:33188},{“sha”:“6cea1bd6d3b9afdaaf5db119235bd216ecd9c448”,“size”:502,“file”:“packages/mars-theme/src/components/loading.js”,“mode”:33188},{“sha”:“35c74d24494e57b7529bbc296b3b6d9dda1e89a9”,“size”:1025,“file”:“packages/mars-theme/src/components/nav.js”,“mode”:33188},{“sha”:“531fd664deaadc2ed75f27a8695b67b01c3c8dd8”,“size”:665,“file”:“packages/mars-theme/src/components/page404.js”,“mode”:33188},{“sha”:“a1776bec650f1d497ee78039b44a8d312120894a”,“size”:2942,“file”:“packages/mars-theme/src/components/post.js”,“mode”:33188},{“sha”:“2e0e6a7316853858f0e6ed692a90486a40408291”,“size”:585,“file”:“packages/mars-theme/src/index.js”,“mode”:33188},{“sha”:“8b1c2cb8e500b5c1fe63be1e37ff8e405eb4c096”,“size”:9186,“file”:“packages/mars-theme/CHANGELOG.md”,“mode”:33188},{“sha”:“fcb530875241aed0c301db7b3386dde88251ce68”,“size”:11345,“file”:“packages/mars-theme/LICENSE”,“mode”:33188},{“sha”:“61efe135653256c9295b978f18ab2360739c3866”,“size”:264214,“file”:“build/static/new-test-now.module.c347eed7f62f8e92a8a7.js”,“mode”:33188},{“sha”:“ab3558a994644367b02cbc9b1b687c85d1964624”,“size”:293401,“file”:“build/analyze/module-production.html”,“mode”:33188},{“sha”:“043959a6c800a45e027f8de27b44a2c4b497badd”,“size”:274044,“file”:“package-lock.json”,“mode”:33188},{“sha”:“df13bf8732def0c22fdf760fc5f06b68ea7f26d3”,“size”:352530,“file”:“build/analyze/es5-production.html”,“mode”:33188},{“sha”:“6d9b925a21dc342e6993b5789b47600c3f698544”,“size”:365594,“file”:“build/analyze/server-production.html”,“mode”:33188},{“sha”:“3cf2ea2f8a4c21820632b991cba475a1fa250bbc”,“size”:381939,“file”:“build/static/new-test-now.es5.d7608939ebaa3f2269db.js”,“mode”:33188},{“sha”:“464e9c5b8a528895431f95e2b727e889cd65ee6f”,“size”:721275,“file”:“build/server.js”,“mode”:33188}],“meta”:{},“alias”:“www.your-site.com”,“builds”:[{“src”:“package.json”,“use”:“@frontity/now”}]}: 802.150ms [debug] [2019-09-09T07:32:48.829Z] Error: your-site.com your-site.com at q.retry (/Users/mario/.npm/_npx/1630/lib/node_modules/now/dist/index.js:2:1761466) at process._tickCallback (internal/process/next_tick.js:68:7) Error! Unexpected error. Please try again later. () [debug] [2019-09-09T07:32:48.834Z] Closing agent [debug] [2019-09-09T07:32:48.835Z] Closing agent

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to use "alias" field in now.json the first time we deploy · Issue ...
If we remove the "alias" field, it works fine and it builds the project. If we include "alias" back again after the first...
Read more >
Alias field type | Elasticsearch Guide [8.5] | Elastic
Writes to field aliases are not supported: attempting to use an alias in an index or update request will result in a failure....
Read more >
Why can't I use column aliases in the next SELECT expression?
The solution is to encapsulate the query in a subquery and then the alias is available outside. SELECT stddev_time, max_time, avg_time, min_time ...
Read more >
Using JSON in Go: A guide with examples - LogRocket Blog
JSON is one of the most-used formats for storing data. In this guide, learn how to work with JSON in Go using the...
Read more >
Amazon Route 53 FAQs - Amazon Web Services
You can use Route 53 to create DNS records for a new domain or transfer DNS records ... once when they are created...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found