Should serve the pages and watch for changes
Going through the tutorial and setup its fine, I'm able to run npm run dev and it compiles successfully, I'm able to see "Hello Next.js" page loading, but after a few seconds the app fails.
error message:
`/Users/myname/Documents/hello-next/node_modules/next/dist/server/on-demand-entry-handler.js:323
(0, _keys2.default)(entries).forEach(function (page) {
^
TypeError: lastAccessPages.includes is not a function
at /Users/myname/Documents/hello-next/node_modules/next/dist/server/on-demand-entry-handler.js:336:25
at Array.forEach (native)
at disposeInactiveEntries (/Users/myname/Documents/hello-next/node_modules/next/dist/server/on-demand-entry-handler.js:323:32)
at null._repeat (/Users/myname/Documents/hello-next/node_modules/next/dist/server/on-demand-entry-handler.js:171:5)
at null.wrapper [as _onTimeout] (timers.js:275:11)
at Timer.listOnTimeout (timers.js:92:15)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: next
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/myname/.npm/_logs/2017-10-19T23_08_17_041Z-debug.log`
npm run dev| Tech | Version |
|---------|---------|
| next | 4.1.1 |
| node | 6.9.2 |
| OS | macOs 10 |
| browser | chrome |
| etc | |
Did a new release (4.1.2) can you try updating?
Hello there!
Next: 4.1.4
Node: 9.0.0 (4.1.2 also)
I have the same error in tutorial - https://learnnextjs.com/basics/getting-started/first-page
Dev server is just broken - when it tries to reload it throws an error:
$ npm run dev
> [email protected] dev
> next
DONE Compiled successfully in 2403ms 1:09:04 PM
> Ready on http://localhost:3000
Client pings, but there's no entry for page: /
> Building page: /
DONE Compiled successfully in 1298ms 1:09:09 PM
[TypeError: lastAccessPages.includes is not a function]
WAIT Compiling... 1:09:10 PM
DONE Compiled successfully in 98ms
node_modules/next/dist/server/on-demand-entry-handler.js:323
(0, _keys2.default)(entries).forEach(function (page) {
^
TypeError: lastAccessPages.includes is not a function
at /node_modules/next/dist/server/on-demand-entry-handler.js:336:25
at Array.forEach (native)
at disposeInactiveEntries (/node_modules/next/dist/server/on-demand-entry-handler.js:323:32)
at null._repeat (node_modules/next/dist/server/on-demand-entry-handler.js:171:5)
at null.wrapper [as _onTimeout] (timers.js:275:11)
at Timer.listOnTimeout (timers.js:92:15)
I made mistake and I didn't realize that I'm still using node 4.9 - with newest node version it works
@timneutkens It would be great if there is information in documentation about required node version
i have the same error
FYI, like @darkowic I was also on node 4.x because I'm on a new Ubuntu 16.04 server and I installed with apt-get out of the box, which comes with node 4.x. Simply installing node via a PPA as advised on the node website got things working.
i update my node from 5.* to 8.5.0. and the problem is solved
For me it's not working in node v10.*, its working in 8.5.0
Most helpful comment
@timneutkens It would be great if there is information in documentation about required node version