简体   繁体   中英

can not find module webpack

when I run command npm run start then it gives an error that is

在此处输入图像描述

webpack config is

  "name": "frokify",
  "version": "1.0.0",
  "description": "frokify project",
  "main": "index.js",
  "scripts": {
    "dev": "webpack --mode development",
    "build": "webpack --mode production",
    "start": "webpack-dev-server --mode development --open"
  },
  "author": "Rizwan",
  "license": "ISC",
  "devDependencies": {
    "webpack": "^4.43.0",
    "webpack-cli": "^3.3.12"
  },
  "dependencies": {
    "live-server": "^1.2.1"
  }
}

Make sure you have webpack added into your package.json . Look for webpack foder under node_modules . If it is not there try npm install before you try npm run start

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM