next.js icon indicating copy to clipboard operation
next.js copied to clipboard

Tutorial problem

Open miyi opened this issue 8 years ago • 1 comments

Tutorial for fetching data gets an error when accessing http://localhost:3000/p/975 directly as tutorial recommended.

error produced: Cannot read property 'replace' of undefined

there is a miscommunication between server routing and post.getInitialprops. server routing names params.id as "title" whereas getInitialprops attempt to read context.id. Change them both to id or title, easy fix.

miyi avatar Feb 27 '18 04:02 miyi

You tried to import or render a component that is undefined.

timneutkens avatar Mar 01 '18 14:03 timneutkens