2

I have wrote a "Hello World" using ReactJS and whenever i try to run the program using npm run start i get the following error:

C:\REACTJSS\node_modules\webpack-cli\bin\convert-argv.js:156
                const webpackConfigurationValidationErrors = validateSchema(
                                                             ^
TypeError: validateSchema is not a function
    at processConfiguredOptions (C:\REACTJSS\node_modules\webpack-cli\bin\convert-argv.js:156:48)
    at module.exports (C:\REACTJSS\node_modules\webpack-cli\bin\convert-argv.js:150:10)
    at Object.<anonymous> (C:\REACTJSS\node_modules\webpack-dev-server\bin\webpack-dev-server.js:234:54)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:188:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! reactjss@1.0.0 start: `webpack-dev-server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the reactjss@1.0.0 start 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!     C:\Users\HP\AppData\Roaming\npm-cache\_logs\2018-03-30T22_42_51_397Z-debug.log

Here is my package.json file

    {
  "name": "reactjss",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "start": "webpack-dev-server"
  },
  "author": "mar",
  "license": "ISC",
  "devDependencies": {
    "babel-core": "^6.26.0",
    "babel-loader": "^7.1.4",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-react": "^6.24.1",
    "webpack": "2.1.0-beta.22",
    "webpack-cli": "2.0.13",
    "webpack-dev-server": "3.1.1"
  },
  "dependencies": {
    "react": "^16.3.0",
    "react-dom": "^16.3.0"
  }
}
Radonirina Maminiaina
  • 6,958
  • 4
  • 33
  • 60
M.A.G
  • 559
  • 2
  • 6
  • 21

0 Answers0