Vue build:prod时报错、求解决方法!
发布于 12天前 作者 y185689601 157 次浏览 来自 问答

vue-element-admin@3.8.1 build:prod D:\WebstormProjects\cy_social_web cross-env NODE_ENV=production env_config=prod node build/build.js

  • building for prod environment… D:\WebstormProjects\cy_social_web\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 (D:\WebstormProjects\cy_social_web\node_modules\script-ext-html-webpack-plugin\lib\plugin.js:50:57) at SyncHook.eval [as call] (eval at create (D:\WebstormProjects\cy_social_web\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:11:1) at SyncHook.lazyCompileHook (D:\WebstormProjects\cy_social_web\node_modules\tapable\lib\Hook.js:154:20) at Compiler.newCompilation (D:\WebstormProjects\cy_social_web\node_modules\webpack\lib\Compiler.js:504:26) at hooks.beforeCompile.callAsync.err (D:\WebstormProjects\cy_social_web\node_modules\webpack\lib\Compiler.js:540:29) at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\WebstormProjects\cy_social_web\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:6:1) at AsyncSeriesHook.lazyCompileHook (D:\WebstormProjects\cy_social_web\node_modules\tapable\lib\Hook.js:154:20) at Compiler.compile (D:\WebstormProjects\cy_social_web\node_modules\webpack\lib\Compiler.js:535:28) at readRecords.err (D:\WebstormProjects\cy_social_web\node_modules\webpack\lib\Compiler.js:274:11) at Compiler.readRecords (D:\WebstormProjects\cy_social_web\node_modules\webpack\lib\Compiler.js:402:11) at hooks.run.callAsync.err (D:\WebstormProjects\cy_social_web\node_modules\webpack\lib\Compiler.js:271:10) at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\WebstormProjects\cy_social_web\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:6:1) at AsyncSeriesHook.lazyCompileHook (D:\WebstormProjects\cy_social_web\node_modules\tapable\lib\Hook.js:154:20) at hooks.beforeRun.callAsync.err (D:\WebstormProjects\cy_social_web\node_modules\webpack\lib\Compiler.js:268:19) at AsyncSeriesHook.eval [as callAsync] (eval at create (D:\WebstormProjects\cy_social_web\node_modules\tapable\lib\HookCodeFactory.js:32:10), <anonymous>:15:1) at AsyncSeriesHook.lazyCompileHook (D:\WebstormProjects\cy_social_web\node_modules\tapable\lib\Hook.js:154:20) 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! D:\nodejs\node_cache_logs\2018-10-11T06_10_25_964Z-debug.log

上面是打包时报的错误、各位知道的帮小弟看看、感激不尽!

回到顶部