Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm error in the learnnextjs tutorial #3135

Closed
1 task done
supersabillon opened this issue Oct 19, 2017 · 8 comments
Closed
1 task done

npm error in the learnnextjs tutorial #3135

supersabillon opened this issue Oct 19, 2017 · 8 comments

Comments

@supersabillon
Copy link

supersabillon commented Oct 19, 2017

  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

Should serve the pages and watch for changes

Current Behavior

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! hello-next@1.0.0 dev: next
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hello-next@1.0.0 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`

Steps to Reproduce (for bugs)

  1. Finish setup in Learnnextjs
  2. run npm run dev

Your Environment

Tech Version
next 4.1.1
node 6.9.2
OS macOs 10
browser chrome
etc
@timneutkens
Copy link
Member

timneutkens commented Oct 20, 2017

Did a new release (4.1.2) can you try updating?

@darkowic
Copy link

darkowic commented Nov 5, 2017

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

> learn_next_js@1.0.0 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)

@darkowic
Copy link

darkowic commented Nov 5, 2017

I made mistake and I didn't realize that I'm still using node 4.9 - with newest node version it works

@darkowic
Copy link

darkowic commented Nov 5, 2017

@timneutkens It would be great if there is information in documentation about required node version

@riyasat-ali
Copy link

i have the same error

@quickshiftin
Copy link

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.

@hanxu317317
Copy link

i update my node from 5.* to 8.5.0. and the problem is solved

@arjunmahishi
Copy link

For me it's not working in node v10.*, its working in 8.5.0

@lock lock bot locked as resolved and limited conversation to collaborators Jul 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants