Npm start webpack problem?

I received the gadget in response and tried to start it with npm start - package.json - "scripts": {"start": "node server.js"

Everything works fine in windows, but when I try to run it on the Ubuntu console, it causes an error

/war/WWW/react_pwa/node_modules/webpack/lib/RuleSet.js:143
              throw new Error ("parameters / request cannot be used with bootloaders");

I updated node.js and npm, so this could be a webpack configuration problem. Now the file is as follows

var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = {
  devtool: 'eval',
  entry: [
    'react-hot-loader/patch',
    'webpack-dev-server/client?http://localhost:3000',
    'webpack/hot/only-dev-server',
    './src/index'
  ],
  output: {
    path: path.join(__dirname, 'dist'),
    filename: 'bundle.js',
    publicPath: '/'
  },
  plugins: [
    new webpack.HotModuleReplacementPlugin(),
      new HtmlWebpackPlugin({
      template: 'index.html'
    })
  ],
  module: {
    loaders: [{
      test: /\.js$/,
      loaders: ['babel'],
      include: path.join(__dirname, 'src'),
      query: {
        "presets": [
          "es2015",
          "stage-0",
          "react"
        ],
        "plugins": [
          "react-hot-loader/babel"
        ]
      }
    },
    {
      test: /\.css/,
      loaders: ["style", "css"]
    }]
  }
};

Any ideas? Thank you

+4
source share
2 answers

loaders: ['babel'] loader: 'babel', .

, "", , .

+2

, package.json.

react-hot-loader, css-loader, style-loader, babel-loader, babel-core, babel-preset-es2015, babel-preset-react, babel-preset-stage-0?

, :

npm install --save-dev react-hot-loader css-loader style-loader babel-loader babel-core babel-preset-es2015 babel-preset-react babel-preset-stage-0

, : ls node_modules Windows , package.json, npm install.

+1

Source: https://habr.com/ru/post/1659173/


All Articles