londers
@londers
Full stack

Webpack выдает «fatal error in line 0» при сборке, что делать?

Здравствуйте, столкнулся с такой проблемой (ОС у меня Linux light на Ubuntu):
Webpack при сборке например такой командой...
webpack-dev-server --mode development --open
...выдает такую картину...
> start.iqfin_app@1.0.0 start /home/egor/Documents/Start.iqFin.ru
> webpack-dev-server --mode development --open

ℹ 「wds」: Project is running at http://localhost:8080/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /home/egor/Documents/Start.iqFin.ru/dist
ℹ 「wdm」: wait until bundle finished: /


#
# Fatal error in , line 0
# Check failed: U_SUCCESS(status).
#
#
#
#FailureMessage Object: 0x7ffc2bf92540Illegal instruction (core dumped)
npm ERR! code ELIFECYCLE
npm ERR! errno 132
npm ERR! start.iqfin_app@1.0.0 start: `webpack-dev-server --mode development --open`
npm ERR! Exit status 132
npm ERR! 
npm ERR! Failed at the start.iqfin_app@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!     /home/egor/.npm/_logs/2019-04-28T10_25_55_292Z-debug.log


Перерыл весь инет ничего не нашел(
Вот какие у меня конфиги:
  • Package.json:
    {
      "name": "start.iqfin_app",
      "version": "1.0.0",
      "main": "index.js",
      "scripts": {
        "build": "webpack --mode production",
        "dev": "webpack --mode development",
        "dev:watch": "webpack --mode development --watch",
        "start": "webpack-dev-server --mode development --open"
      },
      "author": "Wolland",
      "license": "ISC",
      "devDependencies": {
        "@babel/cli": "^7.2.3",
        "@babel/core": "^7.3.4",
        "@babel/preset-env": "^7.3.4",
        "babel-loader": "^8.0.5",
        "css-loader": "^2.1.1",
        "html-webpack-plugin": "^4.0.0-beta.5",
        "mini-css-extract-plugin": "^0.5.0",
        "node-sass": "^4.12.0",
        "optimize-css-assets-webpack-plugin": "^5.0.1",
        "pug": "^2.0.3",
        "pug-loader": "^2.4.0",
        "sass-loader": "^7.1.0",
        "style-loader": "^0.23.1",
        "uglifyjs-webpack-plugin": "^2.1.2",
        "webpack": "^4.30.0",
        "webpack-cli": "^3.3.1",
        "webpack-dev-server": "^3.3.1"
      },
      "dependencies": {
        "@babel/polyfill": "^7.2.5",
        "axios": "^0.18.0",
        "pug": "^2.0.3"
      },
      "repository": {
        "type": "git",
        "url": "git+https://github.com/HogwartsProgrammers/Start.iqFin.ru.git"
      },
      "bugs": {
        "url": "https://github.com/HogwartsProgrammers/Start.iqFin.ru/issues"
      },
      "homepage": "https://github.com/HogwartsProgrammers/Start.iqFin.ru#readme",
      "description": ""
    }

  • webpack.config.js:
    const path = require('path') // Модуль NodeJS для работы с путями
    const HTMLPlugin = require('html-webpack-plugin')
    const MiniCssExtractPlugin = require("mini-css-extract-plugin")
    const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin')
    const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
    module.exports = {
        entry: ['./src/index.js'],
        output: {
            filename: 'bundle.js',
            path: path.resolve(__dirname, 'dist')
        },
        optimization: {
            minimizer: [
                new OptimizeCssAssetsPlugin({}),
                new UglifyJsPlugin({})
            ]
        },
        devServer: {
            contentBase: __dirname + '/dist',
            port: '8080'
        },
        plugins: [
            new HTMLPlugin({
                filename: 'index.html',
                // template: './src/index.html'
                template: './src/index.pug'
            }),
            new MiniCssExtractPlugin({
                filename: 'spectre.min.css'
            })
        ],
        resolve: {
            extensions: ['.js']
        },
        module: {
            rules: [
                { test: /\.pug$/, loader: 'pug-loader', options: { pretty: true } },
                { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' },
                { test: /\.css$/, use: [MiniCssExtractPlugin.loader, 'css-loader'] }
            ]
        }
    }

  • Вопрос задан
  • 960 просмотров
Решения вопроса 1
sfi0zy
@sfi0zy
Creative frontend developer
Это баг в node.js 12 версии. Пока они не исправили ситуацию, вы можете вернуться к 10 LTS версии. С ней таких проблем не будет.
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы