无法解决&style-loader' webpack 4

时间:2018-05-31 12:11:38

标签: node.js reactjs webpack

https://github.com/ViktorNA/BooksProject

运行" build"

"scripts": {
    "dev": "concurrently -r --kill-others-on-fail \"yarn server\" \"yarn client\""
  }
Webpack finish work with 9 errors for every .js - file
./client/src/index.js
  11:0  error  Module not found: Error: Can't resolve 'style-loader' in 'D:\Zona
               Downloads\ITVDN NodeJS\materials\books'
....
./client/src/router.js
  0:0  error  Module not found: Error: Can't resolve 'style-loader' in 'D:\Zona
              Downloads\ITVDN NodeJS\materials\books'
and 1 warning
The 'mode' option has not been set, webpack will fallback to
                'production' for this value. Set 'mode' option to 'development' or
                'production' to enable defaults for each environment.

.babelrc:
{
  "presets": ["es2015", "react"]
}

devDepensis:
{
    "babel-cli": "^6.26.0",
    "babel-core": "^6.26.3",
    "babel-loader": "^7.1.4",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-react": "^6.24.1",
    "babel-preset-stage-0": "^6.24.1",
    "babel-preset-stage-2": "^6.24.1",
    "concurrently": "^3.5.1",
    "css-loader": "^0.28.11",
    "html-webpack-plugin": "^3.2.0",
    "react-hot-loader": "^4.0.0",
    "redux-devtools": "^3.4.1",
    "style-loader": "^0.21.0",
    "webpack": "^4.10.2",
    "webpack-cli": "^2.1.4",
    "webpack-command": "^0.2.0",
    "webpack-config": "^7.5.0",
    "webpack-dev-middleware": "^3.1.3",
    "webpack-hot-middleware": "^2.22.2"
  }

如何解决?

0 个答案:

没有答案