美文网首页
解决TypeError: Cannot read propert

解决TypeError: Cannot read propert

作者: yugi_swift | 来源:发表于2019-07-29 11:59 被阅读0次

npm run build

> test-vue@1.0.0 build D:\nginx\html\bus_tmp

> node build/build.js

- building for production...D:\nginx\html\bus_tmp\node_modules\extract-text-webpack-plugin\dist\index.js:183

    compiler.hooks.thisCompilation.tap(plugin, compilation => {

                  ^

TypeError: Cannot read property 'thisCompilation' of undefined

    at ExtractTextPlugin.apply (D:\nginx\html\bus_tmp\node_modules\extract-text-webpack-plugin\dist\index.js:183:20)

    at Compiler.apply (D:\nginx\html\bus_tmp\node_modules\webpack\node_modules\tapable\lib\Tapable.js:375:16)

    at webpack (D:\nginx\html\bus_tmp\node_modules\webpack\lib\webpack.js:32:19)

    at err (D:\nginx\html\bus_tmp\build\build.js:19:3)

    at next (D:\nginx\html\bus_tmp\node_modules\rimraf\rimraf.js:75:7)

    at CB (D:\nginx\html\bus_tmp\node_modules\rimraf\rimraf.js:111:9)

    at D:\nginx\html\bus_tmp\node_modules\rimraf\rimraf.js:137:14

    at FSReqWrap.oncomplete (fs.js:153:21)

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! test-vue@1.0.0 build: `node build/build.js`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the test-vue@1.0.0 build script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

解决方法

先执行:npm uninstall --save-dev extract-text-webpack-plugin

再执行:npm install --save-dev extract-text-webpack-plugin

相关文章

网友评论

      本文标题:解决TypeError: Cannot read propert

      本文链接:https://www.haomeiwen.com/subject/huigrctx.html