Cannot read property 'tap' of…
2018-09-18 06:37:20来源:博客园 阅读 ()
E:\vue-project\vue-element-admin-master>npm run build:prod
vue-element-admin@3.8.1 build:prod E:\vue-project\vue-element-admin-master
cross-env NODE_ENV=production env_config=prod node build/build.js
- building for prod environment...E:\vue-project\vue-element-admin-master\node_modules\script-ext-html-webpack-plugin\lib\plugin.js:50
compilation.hooks.htmlWebpackPluginAlterAssetTags.tap(PLUGIN, alterAssetTags);
^
TypeError: Cannot read property 'tap' of undefined
at ScriptExtHtmlWebpackPlugin.compilationCallback (E:\vue-project\vue-element-admin-master\node_modules\script-ext-html-webpack-plugin\lib\plugin.js:50:57)
at SyncHook.eval [as call] (eval at create (E:\vue-project\vue-element-admin-master\node_modules\tapable\lib\HookCodeFactory.js:17:12), :11:1)
at SyncHook.lazyCompileHook [as _call] (E:\vue-project\vue-element-admin-master\node_modules\tapable\lib\Hook.js:35:21)
at Compiler.newCompilation (E:\vue-project\vue-element-admin-master\node_modules\webpack\lib\Compiler.js:504:26)
at hooks.beforeCompile.callAsync.err (E:\vue-project\vue-element-admin-master\node_modules\webpack\lib\Compiler.js:540:29)
at AsyncSeriesHook.eval [as callAsync] (eval at create (E:\vue-project\vue-element-admin-master\node_modules\tapable\lib\HookCodeFactory.js:24:12), :6:1)
at AsyncSeriesHook.lazyCompileHook [as _callAsync] (E:\vue-project\vue-element-admin-master\node_modules\tapable\lib\Hook.js:35:21)
at Compiler.compile (E:\vue-project\vue-element-admin-master\node_modules\webpack\lib\Compiler.js:535:28)
at readRecords.err (E:\vue-project\vue-element-admin-master\node_modules\webpack\lib\Compiler.js:274:11)
at Compiler.readRecords (E:\vue-project\vue-element-admin-master\node_modules\webpack\lib\Compiler.js:402:11)
at hooks.run.callAsync.err (E:\vue-project\vue-element-admin-master\node_modules\webpack\lib\Compiler.js:271:10)
at AsyncSeriesHook.eval [as callAsync] (eval at create (E:\vue-project\vue-element-admin-master\node_modules\tapable\lib\HookCodeFactory.js:24:12), :6:1)
at AsyncSeriesHook.lazyCompileHook [as _callAsync] (E:\vue-project\vue-element-admin-master\node_modules\tapable\lib\Hook.js:35:21)
at hooks.beforeRun.callAsync.err (E:\vue-project\vue-element-admin-master\node_modules\webpack\lib\Compiler.js:268:19)
at AsyncSeriesHook.eval [as callAsync] (eval at create (E:\vue-project\vue-element-admin-master\node_modules\tapable\lib\HookCodeFactory.js:24:12), :15:1)
at AsyncSeriesHook.lazyCompileHook [as _callAsync] (E:\vue-project\vue-element-admin-master\node_modules\tapable\lib\Hook.js:35:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-element-admin@3.8.1 build:prod: cross-env NODE_ENV=production env_config=prod node build/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-element-admin@3.8.1 build:prod 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:\Users\Administrator\AppData\Roaming\npm-cache_logs\2018-09-05T05_37_15_612Z-debug.log
解决方法:
- set "html-webpack-plugin": "^4.0.0-alpha" => "4.0.0-alpha"
- remove node_modules
- remove package-lock.json
- npm install
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
- javascript IE中的DOM ready应用技巧 2019-11-17
- 关于获取input标签属性的获取以及更改,此处用到的是readonl 2019-08-14
- vue-property-decorator使用指南 2019-08-14
- 微信网页录音功能 2019-04-30
- 微信小程序报Cannot read property 'setData 2019-04-25
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash