Next.js: Module not found: Error: Cannot resolve module 'next/router'

Created on 22 Dec 2016  路  10Comments  路  Source: vercel/next.js

Hi

I try to use next/router in my project.
but always show "Module not found: Error: Cannot resolve module 'next/router'"

try to reinstall nextjs, but next/router is always missing.

Most helpful comment

Released 2.0.0-beta.2.

All 10 comments

May be it's related to this: https://github.com/zeit/next.js/pull/464
@nkzawa shall we cut a new beta?

+1 @arunoda @nkzawa

+1

馃槀

+1

Guys, we've fixed this problem and now it's available on NPM. (2.0.0-beta-1)
But we fixed an another related issue.

@rauchg @nkzawa could you cut a new beta release again?

Released 2.0.0-beta.2.

Still getting an error when trying to use the router 馃槙 I even deleted node_modules and reinstalled.

When I try and do import Router from 'next/router' I get this:

image

@souporserious You may need to do yarn upgrade

I'm dumb 馃槥 thanks! That worked perfect 馃槃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

swrdfish picture swrdfish  路  3Comments

flybayer picture flybayer  路  3Comments

ghost picture ghost  路  3Comments

rauchg picture rauchg  路  3Comments

jesselee34 picture jesselee34  路  3Comments