Java自学者论坛

 找回密码
 立即注册

手机号码,快捷登录

恭喜Java自学者论坛(https://www.javazxz.com)已经为数万Java学习者服务超过8年了!积累会员资料超过10000G+
成为本站VIP会员,下载本站10000G+会员资源,会员资料板块,购买链接:点击进入购买VIP会员

JAVA高级面试进阶训练营视频教程

Java架构师系统进阶VIP课程

分布式高可用全栈开发微服务教程Go语言视频零基础入门到精通Java架构师3期(课件+源码)
Java开发全终端实战租房项目视频教程SpringBoot2.X入门到高级使用教程大数据培训第六期全套视频教程深度学习(CNN RNN GAN)算法原理Java亿级流量电商系统视频教程
互联网架构师视频教程年薪50万Spark2.0从入门到精通年薪50万!人工智能学习路线教程年薪50万大数据入门到精通学习路线年薪50万机器学习入门到精通教程
仿小米商城类app和小程序视频教程深度学习数据分析基础到实战最新黑马javaEE2.1就业课程从 0到JVM实战高手教程MySQL入门到精通教程
查看: 563|回复: 0

vue报错解决方案

[复制链接]
  • TA的每日心情
    奋斗
    2024-11-24 15:47
  • 签到天数: 804 天

    [LV.10]以坛为家III

    2053

    主题

    2111

    帖子

    72万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    积分
    726782
    发表于 2021-7-20 17:46:34 | 显示全部楼层 |阅读模式
    Vue build faild
    解决办法: https://blog.csdn.net/u011169370/article/details/83346176
    ? jbcmVideo git:(oahcoay) ? npm run build
    
    > jbcm_video@1.0.0 build /Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo
    > node build/build.js
    
    ? building for production.../Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/node_modules/last-call-webpack-plugin/src/index.js:170
    compiler.hooks.compilation.tap(
    ^
    
    TypeError: Cannot read property 'compilation' of undefined
    at OptimizeCssAssetsWebpackPlugin.apply (/Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/node_modules/last-call-webpack-plugin/src/index.js:170:20)
    at Compiler.apply (/Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/node_modules/tapable/lib/Tapable.js:375:16)
    at webpack (/Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/node_modules/webpack/lib/webpack.js:33:19)
    at err (/Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/build/build.js:19:3)
    at next (/Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/node_modules/rimraf/rimraf.js:75:7)
    at CB (/Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/node_modules/rimraf/rimraf.js:111:9)
    at /Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/node_modules/rimraf/rimraf.js:137:14
    at FSReqWrap.oncomplete (fs.js:182:21)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! jbcm_video@1.0.0 build: `node build/build.js`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the jbcm_video@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! /Users/macbookpro/.npm/_logs/2019-05-12T06_48_19_784Z-debug.log
    
    
    ? jbcmVideo git:(oahcoay) ? npm i uglifyjs-webpack-plugin@1.0.0 --save
    npm WARN css-loader@2.1.1 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
    npm WARN optimize-css-assets-webpack-plugin@5.0.1 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
    
    + uglifyjs-webpack-plugin@1.0.0
    added 5 packages and updated 3 packages in 12.301s
    ? jbcmVideo git:(oahcoay) ? npm run build
    
    > jbcm_video@1.0.0 build /Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo
    > node build/build.js
    
    ? building for production.../Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/node_modules/last-call-webpack-plugin/src/index.js:170
    compiler.hooks.compilation.tap(
    ^
    
    TypeError: Cannot read property 'compilation' of undefined
    at OptimizeCssAssetsWebpackPlugin.apply (/Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/node_modules/last-call-webpack-plugin/src/index.js:170:20)
    at Compiler.apply (/Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/node_modules/tapable/lib/Tapable.js:375:16)
    at webpack (/Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/node_modules/webpack/lib/webpack.js:33:19)
    at err (/Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/build/build.js:19:3)
    at next (/Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/node_modules/rimraf/rimraf.js:75:7)
    at CB (/Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/node_modules/rimraf/rimraf.js:111:9)
    at /Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/node_modules/rimraf/rimraf.js:137:14
    at FSReqWrap.oncomplete (fs.js:182:21)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! jbcm_video@1.0.0 build: `node build/build.js`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the jbcm_video@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! /Users/macbookpro/.npm/_logs/2019-05-12T06_50_56_664Z-debug.log
    ? jbcmVideo git:(oahcoay) ? npm install --save-dev last-call-webpack-plugin
    npm WARN css-loader@2.1.1 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
    npm WARN optimize-css-assets-webpack-plugin@5.0.1 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
    
    + last-call-webpack-plugin@3.0.0
    updated 1 package in 18.718s
    ? jbcmVideo git:(oahcoay) ? npm run build
    
    > jbcm_video@1.0.0 build /Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo
    > node build/build.js
    
    ? building for production.../Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/node_modules/last-call-webpack-plugin/src/index.js:170
    compiler.hooks.compilation.tap(
    ^
    
    TypeError: Cannot read property 'compilation' of undefined
    at OptimizeCssAssetsWebpackPlugin.apply (/Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/node_modules/last-call-webpack-plugin/src/index.js:170:20)
    at Compiler.apply (/Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/node_modules/tapable/lib/Tapable.js:375:16)
    at webpack (/Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/node_modules/webpack/lib/webpack.js:33:19)
    at err (/Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/build/build.js:19:3)
    at next (/Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/node_modules/rimraf/rimraf.js:75:7)
    at CB (/Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/node_modules/rimraf/rimraf.js:111:9)
    at /Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/node_modules/rimraf/rimraf.js:137:14
    at FSReqWrap.oncomplete (fs.js:182:21)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! jbcm_video@1.0.0 build: `node build/build.js`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the jbcm_video@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! /Users/macbookpro/.npm/_logs/2019-05-12T06_53_52_260Z-debug.log
    ? jbcmVideo git:(oahcoay) ? npm i optimize-css-assets-webpack-plugin@2 --save 
    npm WARN css-loader@2.1.1 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
    npm WARN optimize-css-assets-webpack-plugin@2.0.0 requires a peer of cssnano@>=3.4.0 but none is installed. You must install peer dependencies yourself.
    
    + optimize-css-assets-webpack-plugin@2.0.0
    added 3 packages, removed 162 packages, updated 1 package and moved 1 package in 13.777s
    ? jbcmVideo git:(oahcoay) ? npm run build
    > jbcm_video@1.0.0 build /Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo
    > node build/build.js
    
    internal/modules/cjs/loader.js:596
    throw err;
    ^
    
    Error: Cannot find module 'cssnano'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15)
    at Function.Module._load (internal/modules/cjs/loader.js:520:25)
    at Module.require (internal/modules/cjs/loader.js:650:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at new OptimizeCssAssetsPlugin (/Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/node_modules/optimize-css-assets-webpack-plugin/index.js:12:33)
    at Object.<anonymous> (/Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/build/webpack.prod.conf.js:55:5)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
    at Module.load (internal/modules/cjs/loader.js:612:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
    at Function.Module._load (internal/modules/cjs/loader.js:543:3)
    at Module.require (internal/modules/cjs/loader.js:650:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo/build/build.js:12:23)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! jbcm_video@1.0.0 build: `node build/build.js`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the jbcm_video@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! /Users/macbookpro/.npm/_logs/2019-05-12T06_54_59_772Z-debug.log
    ? jbcmVideo git:(oahcoay) ? npm i cssnano --save-dev
    npm WARN css-loader@2.1.1 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
    
    + cssnano@4.1.10
    added 163 packages in 17.227s
    ? jbcmVideo git:(oahcoay) ? npm run build
    
    > jbcm_video@1.0.0 build /Users/macbookpro/Downloads/workspace/jbcm/jbcmVideo
    > node build/build.js
    
    ? building for production...
    Starting to optimize CSS...
    Processing static/css/app.68b3855e3d311999d47299118cadee89.css...
    ? building for production...Processed static/css/app.68b3855e3d311999d47299118cadee89.css, before: 464096, after: 430542, ratio: 92.77%
    Hash: e2174f907aebed0c2609
    Version: webpack 3.12.0
    Time: 44457ms
    Asset Size Chunks Chunk Names
    static/img/jbcmlogo.49e7f84.png 10.5 kB [emitted] 
    static/img/BRAND.5081ccf.png 17.6 kB [emitted] 
    static/fonts/element-icons.732389d.ttf 56 kB [emitted] 
    static/img/banner01.07a23d1.png 1.78 MB [emitted] [big] 
    static/img/jbdxlogo2.970286b.png 13.5 kB [emitted] 
    static/img/tupian@2x.4d07db2.png 327 kB [emitted] [big] 
    static/img/icon_xiangxia.8364a0d.png 17.9 kB [emitted] 
    static/img/公众号二维码.4fee8ce.png 25.7 kB [emitted] 
    static/img/class_picture.7cf7ac2.png 276 kB [emitted] [big] 
    static/img/course-desc.190c153.png 847 kB [emitted] [big] 
    static/fonts/element-icons.535877f.woff 28.2 kB [emitted] 
    static/img/jbdxlogo.0535093.png 15.7 kB [emitted] 
    static/js/vendor.9944116eb145567d2a7b.js 1.36 MB 0 [emitted] [big] vendor
    static/js/app.49cd273013387c8d38fa.js 178 kB 1 [emitted] app
    static/js/manifest.2ae2e69a05c33dfc65f8.js 857 bytes 2 [emitted] manifest
    static/css/app.68b3855e3d311999d47299118cadee89.css 431 kB 1 [emitted] [big] app
    static/js/vendor.9944116eb145567d2a7b.js.map 5.44 MB 0 [emitted] vendor
    static/js/app.49cd273013387c8d38fa.js.map 557 kB 1 [emitted] app
    static/css/app.68b3855e3d311999d47299118cadee89.css.map 667 kB 1 [emitted] app
    static/js/manifest.2ae2e69a05c33dfc65f8.js.map 4.97 kB 2 [emitted] manifest
    index.html 927 bytes [emitted] 
    
    Build complete.
    
    Tip: built files are meant to be served over an HTTP server.
    Opening index.html over file:// won't work.
    —— build success;

     

    哎...今天够累的,签到来了1...
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    QQ|手机版|小黑屋|Java自学者论坛 ( 声明:本站文章及资料整理自互联网,用于Java自学者交流学习使用,对资料版权不负任何法律责任,若有侵权请及时联系客服屏蔽删除 )

    GMT+8, 2024-12-22 16:41 , Processed in 0.060108 second(s), 29 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2021, Tencent Cloud.

    快速回复 返回顶部 返回列表