menu
Channels
Team
Paulo De Mitri
@paulogdm
Guillermo Rauch
@rauchg
Joe Cohen
@joecohens
Tim
@timneutkens
William Li
@williamli
Arunoda Susiripala
@arunoda
Timothy
@timothyis
Leo Lamprecht
@leo
Matheus Fernandes
@matheus
Olli Vanhoja
@olli-vanhoja
Allen Hai
@coetry
Max Rovensky
@rdev
Steven
@styfle
Matthew Sweeney
@msweeneydev
Luis
@lfades
Naoyuki Kanezawa
@nkzawa
Igor Klopov
@igorklopov
Javi Velasco
@javivelasco
Evil Rabbit
@evilrabbit
Shu Ding
@shu
Connor Davis
@davis
Harrison Harnisch
@harrison
Andy Bitz
@andybitz
Amio
@amio
Huvik
@huv1k
Joe Haddad
@timer
Juan Campa
@juancampa
Shuying Lin
@b3nny
Ana Trajkovska
@ana-trajkovska
Christopher Skillicorn
@skllcrn
Posts
Chat
Members
Info
Show previous messages

July 16, 2019 at 1:13pm

Need HELP registering new account...tried to sign up few times the other week and had some device issues, but now when I'm able to get through properly it is saying the accountname that I want is taken. I believe its taken by me, but with a half setup account that I can't get into - wondering how to best get some support?

  • reply
  • like

Need HELP registering new account...tried to sign up few times the other week and had some device issues, but now when I'm able to get through properly it is saying the accountname that I want is taken. I believe its taken by me, but with a half setup account that I can't get into - wondering how to best get some support?

It is giving me an error that "The username is already in use"

  • reply
  • like

July 19, 2019 at 3:43am

Hi. Yesterday my code worked.

server: express node: module index.mjs import express from "express";

const app = express();

app.get('*', (req, res) => { res.status(200).send({key:'test'}); });

export default app

now: { "version": 2, "name": "WebDav", "builds": [ { "src": "index.mjs", "use": "@now/node" } ], "routes": [ { "src": "/", "dest": "index.mjs" } ] }

but today it is not work. What's happend ?

i get an error

SyntaxError: Unexpected identifier at Module._compile (internal/modules/cjs/loader.js:721:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:690:17) at require (internal/modules/cjs/helpers.js:25:18) at Object.<anonymous> (/tmp/zeit-fun-02176ca18c0dc/___now_launcher.js:21:18) at Module._compile (internal/modules/cjs/loader.js:776:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)

How can i use *.mjs with express ?

  • reply
  • like

Hi all - is it correct that I can't use a subdomain with Now if I don't have the TLD registered with Now as well? We're testing out Now but don't want to migrate the DNS to Now yet.

I did a search and it returned that it's not possible, but they were older posts.

I have several custom subdomains attached to my now deployments without having to transfer my domain to now.

  • reply
  • like

Hi all, I am making an api request in getInitialProps (next.js) to a now lambda (express). I am checking if a cookie exists, if it doesn't, I want to redirect.

So I am doing something like this:

app.get("*", (req: Request, res: Response) => {
if (no-cookie-code) {
return res.redirect('/');
} else {
res.set('Content-Type', 'text/html');
res.status(200).end('LETS ROCK');
}
})

My redirect is working but instead of getting a full redirect of the browser, the html is rendered into a string and returned as a response to the getInitialProps and then rendered as a string on screen...

That snippet is from your api? So your api is doing a redirect but not your nextjs app? Maybe you can return a message from your api instead to your nextjs app and have it do the actual redirection.

  • reply
  • like

Fast question, is it possible to change the location of deployment from the us to europe? Been searching for a little bit but thought it would be better to ask the community :)

  • reply
  • like

It is possible via CLI using the --regions flag or in now.json using the regions property which accepts an array of string values. The names of the CDN edge servers can be found here: https://zeit.co/smart-cdn

like-fill
1
  • reply
  • like

July 19, 2019 at 10:39pm

Love the addition of production/staging per project!

  • reply
  • like

I have an Angular 8 project that is a web component that when I build I get a 404 from Zeit

  • reply
  • like

Can anyone help us resolve this?

  • reply
  • like

The page could not be found.

The page could not be found in the application.

404: NOT_FOUND Code: FILE_NOT_FOUND ID: cle1:28qd4-1563594037845-9f171e92ab21

  • reply
  • like

July 20, 2019 at 10:13am

hey all, anyone here

  • reply
  • like

i have a problem with my react project. If i type "now" inside the react folder it just works, i dont even need to have a now.json file

  • reply
  • like

but when i am in the root directory (one level above) then it doesn't work anymore

  • reply
  • like
{
"version": 2,
"builds": [
{ "src": "*.js", "use": "@now/node" },
{ "src": "index.html", "use": "@now/static" },
{ "src": "go/*.go", "use": "@now/go" },
{ "src": "react/package.json", "use": "@now/static-build", "config": { "distDir": "build" } }
],
"routes": [
{ "src": "/(.*)", "dest": "/react/$1" }
]
}
  • reply
  • like

this is my now.json file

  • reply
  • like

Ohh, i was accessing the wrong url, i was trying to access site/react instead of site/ now it seems to work, very impressive!

  • reply
  • like

I have a question regarding the local development (now dev) is there a way to warm up all functions directly? It seems like it will only start to execute a function (like a go endpoint) when i am actually accessing it

  • reply
  • like

is there a way to just load them all up directly?

  • reply
  • like

Hello? is this chat alive? Lol

  • reply
  • like

Hello, guys.

I faced issue when use nextjs 9 dynamic routes and now2. I would be very grateful if someone can help me with problem: I have a multilanguage web app with two locales. One of which accessible without any routes (default). Another locale accessible with /en-US. App also have other dynamic routes such as (/blog/:slug, /tagged/:tag) that also presents in two languages. But when I deploy this at now.sh, then no one of that routes are not found. I have tried define routes in now.json, but unsuccessfully, possible it is because I am not so good in regex.

Please, help me make right routes :)

now.json: { "version": 2, "builds": [ { "src": "next.config.js", "use": "@now/next" }, { "src": "lambdas/*/.ts", "use": "@now/node" } ], "env": { "TELEGRAM_API": "@telegram_api", "TELEGRAM_CHAT_ID": "@telegram_chat_id" }, "build": { "env": { "SPACE_ID": "@space_id", "ACCESS_TOKEN": "@access_token" } }, "routes": [ { "src": "^/service-worker.js$", "dest": "/_next/static/service-worker.js", "headers": { "cache-control": "public,max-age=31536000,s-max-age=31536000,immutable", "Service-Worker-Allowed": "/" } }, { "src": "^(/_next/static//.+)$", "headers": { "cache-control": "public,max-age=31536000,s-max-age=31536000,immutable" } }, { "src": "^(/static//.+)$", "headers": { "cache-control": "public,max-age=31536000,s-max-age=31536000,immutable" } }, { "src": "^/sitemap.xml$", "dest": "/lambdas/sitemap.ts" }, { "src": "^/send-message$", "dest": "/lambdas/send-message.ts", "methods": ["POST"] }, { "src": "/blog/$", "dest": "/blog" }, { "src": "/blog", "status": 301, "headers": { "Location": "/blog/" } }, { "src": "/tagged/(?<tag>[^/])/$", "dest": "/tagged/?tag=$tag" }, { "src": "/tagged/(?<tag>[^/])$", "status": 301, "headers": { "Location": "/tagged/$tag/" } }, { "src": "/(?<language>[^/])/$", "dest": "/?language=$language" }, { "src": "/(?<language>[^/])/", "status": 301, "headers": { "Location": "/$language/" } }, { "src": "/(?<language>[^/])/blog/$", "dest": "/blog?language=$language" }, { "src": "/(?<language>[^/])/blog", "status": 301, "headers": { "Location": "/$language/blog/" } }, { "src": "/(?<language>[^/])/tagged/(?<tag>[^/])/$", "dest": "/tagged/?language=$language&tag=$tag" }, { "src": "/(?<language>[^/])/tagged/(?<tag>[^/])$", "status": 301, "headers": { "Location": "/$language/tagged/$tag/" } }, { "handle": "filesystem" }, { "src": "/(?<language>)/(.)", "status": 404, "dest": "/_error?language=$language" }, { "src": "/(.)", "status": 404, "dest": "/_error" } ] }

  • reply
  • like

July 21, 2019 at 12:10pm

Hi anyone encountered same issue?

  • reply
  • like

July 22, 2019 at 8:24am

I'm new here and everything has been great so far but I hit this road block today with 2 my express routes:

server.get("/:id", (req, res) => {
return app.render(req, res, "/discussion", { query: req.query, params: req.params });
});
server.get("/:forumId/:categoryId", (req, res) => {
return app.render(req, res, "/discussions", { query: req.query, params: req.params });
});

error in log from ziet.co:

START RequestId: 3f0f5efd-5fef-4b29-b8f9-93db12a59511 Version: $LATEST
END RequestId: 3f0f5efd-5fef-4b29-b8f9-93db12a59511
REPORT RequestId: 3f0f5efd-5fef-4b29-b8f9-93db12a59511
Duration: 13.26 ms Billed Duration: 100 ms Memory Size: 3008 MB Max Memory Used: 94 MB

any ideas how to fix this? or what could be the possible causes?

kind regards, Travis

  • reply
  • like

I'm new here and everything has been great so far but I hit this road block today with 2 my express routes:

server.get("/:id", (req, res) => {
return app.render(req, res, "/discussion", { query: req.query, params: req.params });
});
server.get("/:forumId/:categoryId", (req, res) => {
return app.render(req, res, "/discussions", { query: req.query, params: req.params });
});

error in log from ziet.co:

START RequestId: 3f0f5efd-5fef-4b29-b8f9-93db12a59511 Version: $LATEST
END RequestId: 3f0f5efd-5fef-4b29-b8f9-93db12a59511
REPORT RequestId: 3f0f5efd-5fef-4b29-b8f9-93db12a59511
Duration: 13.26 ms Billed Duration: 100 ms Memory Size: 3008 MB Max Memory Used: 94 MB

any ideas how to fix this? or what could be the possible causes?

kind regards, Travis

ok, I see what I did wrong; I just read the latest blog post: https://nextjs.org/blog/next-9#dynamic-route-segments

  • reply
  • like