3

I am trying to get started with Next.js, yet I receive the following error:

Module build failed: Error: Cannot find module 'react-hot-loader/babel' from '/home/ugurkaya/Desktop'

The following is my package.json:

  "name": "hello-next",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "scripts": {
    "dev": "next",
    "build": "next build",
    "start": "next start"
  },
  "dependencies": {
    "next": "^6.0.4-canary.6",
    "react": "^16.4.1",
    "react-dom": "^16.4.1",
    "react-hot-loader": "next"
  }

I added the react-hot-loader dependency manually when I get this error, yet it did not solve. Looking forward your helps!

2 Answers 2

3

I fixed this issue by just

npm install react-hot-loader --save-dev
Sign up to request clarification or add additional context in comments.

Comments

0

This issue is generate because react not find react-hot-loader in dev dependancy

You can solve this problem you just need to install react-hot-loader as dev dependancy

npm install react-hot-loader --save-dev

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.