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

Error: Cannot find module 'react' in version '^2.0.0-beta.27' #1182

Closed
vernondegoede opened this issue Feb 16, 2017 · 4 comments
Closed

Error: Cannot find module 'react' in version '^2.0.0-beta.27' #1182

vernondegoede opened this issue Feb 16, 2017 · 4 comments

Comments

@vernondegoede
Copy link

Hi!

I created a new project yesterday using the stable version of next.js. However, I was feeling adventurous and tried upgrading next using the command npm install --save next@beta. Everything went well, except for some unmet peer deps.:

── UNMET PEER DEPENDENCY react@^15.4.2
── UNMET PEER DEPENDENCY react-dom@^15.4.2

When I ran npm run dev, Next refuses to start and throws the following error message:

❯ npm run dev

> [email protected] dev /Users/vernon/Sites/ecurring-homepage
> next

Error: Cannot find module 'react'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/vernon/Sites/ecurring-homepage/node_modules/next/dist/server/render.js:277:14)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

The only dependencies that are listed in my package.json are:

  "dependencies": {
    "next": "^2.0.0-beta.27",
    "styled-components": "^1.4.3"
  }

Am I missing something?

@sammdec
Copy link

sammdec commented Feb 16, 2017

As of beta.27 react and react-dom are not included, all you need to do is install them e.g npm i -S react react-dom

@timneutkens
Copy link
Member

See https://github.com/zeit/next.js#setup

@vernondegoede
Copy link
Author

Thanks! Sorry, not sure how I could've missed that...

@timneutkens
Copy link
Member

❤️

@lock lock bot locked as resolved and limited conversation to collaborators May 12, 2018
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

3 participants