menu
Channels
Team
Posts
Chat
Members
Info
Show previous messages

November 7, 2019 at 3:16pm
Simillar effect is visible on hulu page also (they use next.js)
  • reply
  • like

November 8, 2019 at 5:26pm
Hi Guys
  • reply
  • like
I need some help
  • reply
  • like
I created build and copied .next, package.json, server.js, next.config.js Then I run npm install and then npm run start 'start': 'node server.js' But I am getting this error Error: ENOENT: no such file or directory, scandir '/home/pratyakash/Documents/crezot/try/pages'
  • reply
  • like

November 10, 2019 at 7:22pm
Hi guys, I need some help. I’m building a SSR Web App with Next.js and Express as the server. I’m trying to figure out how to persist data among the different routes, that point to different pages. The idea is to pass global data from the server and inject it in a sort of "wrapper". I see that there is a possibility to extend _app.js but I red that this has some cons. From the docs: // Only uncomment this method if you have blocking data requirements for // every single page in your application. This disables the ability to // perform automatic static optimization, causing every page in your app to // be server-side rendered. What do you think about this? Thanks
  • reply
  • like

November 11, 2019 at 1:42pm
Hi everyone. I'm seeing a really weird behaviour on my nextjs app. I don't know if i'm missing something or if it is a bug. You can reproduce this using the npx create-next-app so i think is not something with my configuration.
If you add something like this
<p>Hello <address>Street...</address></p>
The server side output will be
<p>Hello </p>
<address>Street...</address>
<p></p>
The client code will then fix this mismatch render but the server side render is wrong.
If you add a span (instead of a address) this does not happen but if you add a div (I know you should not add in a p, this is only for reproduce the problem xD) happen too.
Do you have any idea if something is missing me or if this is a bug?
Cheers everyone
  • reply
  • like

November 11, 2019 at 8:04pm
P can't contain any block elements, like div. This is normal behaviour:
The P element represents a paragraph. It cannot contain block-level elements (including P itself).
from w3 site
  • reply
  • like
I mostly depend what params do you need to share between page. If this is just one time operation on server side that needs to be share across whole app then use _app.js and pass it to props, but anyway. Why passing something in _app.js and not use redux ?
  • reply
  • like
Hello everyone. I am new here
  • reply
  • like
Happy to be amongst you
  • reply
  • like
hello guys, thanks for the good work you do
  • reply
  • like
btw. is there any way to reset my point in tutorial? I know it means nothing but it makes me feel bad that I checked the wrong answer
  • reply
  • like
ussually a html is displayed correctly no matter if is valid. In client side works right? XD the div was give by example as i now that cannot be used. But readding the w3 again i notice that i mistake address. Address is a flow content and that is the reason why cannot be used in p. I thought wanst a flow one. But no mattet what i do not see why the render of invalid html is diffetent in server or on client. Should be thr same right?
  • reply
  • like

November 12, 2019 at 8:21am
Hello Guys Is anybody have uploaded Next.js app to AWS lambda? I have try to upload and upload get successfully but whenever i try to access from Lambda URL always get {"message": "Internal server error"} while in local environment it's working properly.
  • reply
  • like

November 12, 2019 at 2:37pm
winecolours=red&winecolours=White does anyone know how to handle params with multiple values in nextjs ?
  • reply
  • like

November 12, 2019 at 8:45pm
use this package to handle query string: https://www.npmjs.com/package/query-string all headers are basiacally in ctx.req.headers.host. Ctx is param of getInitialProps https://nextjs.org/docs#custom-document
  • reply
  • like
Hi folks. How would I load a self-hosted font in Next? In Gatsby I'd normally find a font here: https://github.com/KyleAMathews/typefaces/ and require() that font in the gatsby-browser.js file. I'm guessing I'd have to do something with webpack in the next.config.js file?
  • reply
  • like

November 13, 2019 at 9:08am
any clue on this? :) thx
  • reply
  • like

November 13, 2019 at 7:59pm
Hello! Could anyone teach me how to setup environment variables correctly. I use a custom express server. My current config is every secret api key is kept in a .env file in the root of my project. I require the dotenv library on the index of my server. Every route is able to use them. However my Next.js 'frontend' can't seem to access the values of these environment values unless I keep some of them in the next.config.js file. How do I manage them in production?
  • reply
  • like

November 14, 2019 at 6:26pm
i'm getting this error in a fresh typescript boirlerplate
  • reply
  • like
RangeError: Invalid array length at __spreadArrays (C:\Users\Ismail\Downloads\Projects\nextjsapp\client.next\server\static\development\pages_error.js:16:18) at emitChange (C:\Users\Ismail\Downloads\Projects\nextjsapp\client.next\server\static\development\pages_error.js:433:52) at new class_1 (C:\Users\Ismail\Downloads\Projects\nextjsapp\client.next\server\static\development\pages_error.js:454:9) at processChild (C:\Users\Ismail\Downloads\Projects\nextjsapp\node_modules\react-dom\cjs\react-dom-server.node.development.js:3161:14) at resolve (C:\Users\Ismail\Downloads\Projects\nextjsapp\node_modules\react-dom\cjs\react-dom-server.node.development.js:3126:5) at ReactDOMServerRenderer.render (C:\Users\Ismail\Downloads\Projects\nextjsapp\node_modules\react-dom\cjs\react-dom-server.node.development.js:3600:22) at ReactDOMServerRenderer.read (C:\Users\Ismail\Downloads\Projects\nextjsapp\node_modules\react-dom\cjs\react-dom-server.node.development.js:3538:29) at renderToString (C:\Users\Ismail\Downloads\Projects\nextjsapp\node_modules\react-dom\cjs\react-dom-server.node.development.js:4247:27) at render (C:\Users\Ismail\Downloads\Projects\nextjsapp\node_modules\next\dist\next-server\server\render.js:81:16) at Object.renderPage (C:\Users\Ismail\Downloads\Projects\nextjsapp\node_modules\next\dist\next-server\server\render.js:322:20) at C:\Users\Ismail\Downloads\Projects\nextjsapp\client.next\server\static\development\pages_document.js:847:21 at step (C:\Users\Ismail\Downloads\Projects\nextjsapp\client.next\server\static\development\pages_document.js:45:23) at Object.next (C:\Users\Ismail\Downloads\Projects\nextjsapp\client.next\server\static\development\pages_document.js:26:53) at asyncGeneratorStep (C:\Users\Ismail\Downloads\Projects\nextjsapp\client.next\server\static\development\pages_document.js:217:24) at _next (C:\Users\Ismail\Downloads\Projects\nextjsapp\client.next\server\static\development\pages_document.js:239:9) at process._tickCallback (internal/process/next_tick.js:68:7) [ event ] build page: / [ wait ] compiling ...
  • reply
  • like
someone can helpe me?
  • reply
  • like

November 15, 2019 at 4:44pm
Hi all. New here. Where is the best place to ask about how to use normal Express middleware (e.g. express-validator) with NextJS via API Routes?
  • reply
  • like
I need help demystifying what Next.js can or can't do with a static export build. I have a front-end only Next.js app with a route like, /user/profile/:userId. It works if I yarn run build && yarn run dev and also if I yarn run build && yarn run start (start does next start -p $PORT. I can access the route and pass different ids in the url and access them at runtime. The IDs are NOT known in advance at build time. With export, I do yarn run build && yarn run export then from the generated, /out dir, I run a basic web server like python -m SimpleHTTPServer 3000. From there, I can't access my user profile route and there is a /test/[userId].html page. Should it be possible to access /user/profile/123 with a next export static build?
  • reply
  • like

November 18, 2019 at 1:08am
Can I ask why this example( https://github.com/zeit/next.js/blob/canary/examples/with-loading/pages/_app.js ) didn't place Router.events.on inside componentDidMount? Document(https://github.com/zeit/next.js#router-events) written Router events should be registered when a component mounts (useEffect or componentDidMount/componentWillUnmount) or imperatively when an event happens. but _app.js is only exception?
and we don't have to Router.events.off in this case?
Edited
  • reply
  • like