ExtractTextPlugin 오류

미해결질문
오병권 프로필

[package.json]

"devDependencies": {

"autoprefixer": "^9.1.5",

"babel-core": "6.24.1",

"babel-eslint": "7.2.3",

"babel-loader": "7.1.1",

"babel-preset-es2015": "6.24.1",

"bootstrap-loader": "^3.0.1",

"bootstrap-sass": "^3.3.7",

"clean-webpack-plugin": "^0.1.19",

"css-loader": "^1.0.0",

"extract-text-webpack-plugin": "^4.0.0-beta.0",

"file-loader": "^2.0.0",

"jquery": "^3.3.1",

"node-sass": "^4.9.3",

"postcss-loader": "^3.0.0",

"raw-loader": "^0.5.1",

"resolve-url-loader": "^3.0.0",

"sass-loader": "^7.1.0",

"style-loader": "^0.23.0",

"url-loader": "^1.1.1",

"webpack": "3.12.0",

"webpack-browser-plugin": "^1.0.20",

"webpack-dev-server": "^2.11.3",

"webpack-merge": "4.1.0",

"webpack-strip": "^0.1.0"

}

[Config]

module: {

rules: [

{

test: /.js$/,

exclude: /node_modules/,

use: [{

loader: 'babel-loader',

options: {

presets: [

['es2015', {modules: false}]

]

}

}]

},

{

test: /.css$/,

// use: ['style-loader', 'css-loader']

use: ExtractTextPlugin.extract({

fallback: 'style-loader',

use: 'css-loader'

})

}

]

},

plugins : [

new webpack.ProvidePlugin({

$ : "jquery",

jQuery : "jquery"

}),

    new CommonsChunkPlugin({

name: "vendor"

}),

new ExtractTextPlugin('styles.css')

]

[Error]

> gettingstarted@1.0.0 build C:\Users\bk\Desktop\ZumInternet\gettingstarted-web-master\gettingstarted-web-master

webpack --env=prod --progress --profile --colors

C:UsersbkDesktopZumInternetgettingstarted-web-mastergettingstarted-web-masternode_moduleswebpackbinwebpack.js:348

throw err;

^

TypeError: Cannot read property 'thisCompilation' of undefined

at ExtractTextPlugin.apply (C:UsersbkDesktopZumInternetgettingstarted-web-mastergettingstarted-web-masternode_module

sextract-text-webpack-plugindistindex.js:183:20)

at Compiler.apply (C:UsersbkDesktopZumInternetgettingstarted-web-mastergettingstarted-web-masternode_modulestapable

libTapable.js:375:16)

at webpack (C:UsersbkDesktopZumInternetgettingstarted-web-mastergettingstarted-web-masternode_moduleswebpacklibwe

bpack.js:33:19)

at processOptions (C:UsersbkDesktopZumInternetgettingstarted-web-mastergettingstarted-web-masternode_moduleswebpack

binwebpack.js:335:15)

at yargs.parse (C:UsersbkDesktopZumInternetgettingstarted-web-mastergettingstarted-web-masternode_moduleswebpackbi

nwebpack.js:397:2)

at Object.Yargs.self.parse (C:UsersbkDesktopZumInternetgettingstarted-web-mastergettingstarted-web-masternode_module

swebpacknode_modulesyargsyargs.js:533:18)

at Object. (C:UsersbkDesktopZumInternetgettingstarted-web-mastergettingstarted-web-masternode_modulesweb

packbinwebpack.js:152:7)

at Module._compile (module.js:662:30)

at Object.Module._extensions..js (module.js:673:10)

at Module.load (module.js:575:32)

at tryModuleLoad (module.js:515:12)

at Function.Module._load (module.js:507:3)

at Function.Module.runMain (module.js:703:10)

at startup (bootstrap_node.js:193:16)

at bootstrap_node.js:660:3

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! gettingstarted@1.0.0 build: webpack --env=prod --progress --profile --colors

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the gettingstarted@1.0.0 build 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:UsersbkAppDataRoamingnpm-cache_logs2018-09-24T13_06_21_834Z-debug.log

이상한 error가 발생합니다... webpack.js에서 에러가 발생하네요...