• npm run build


    npm run bulid 失败

    C:work官网XXX>npm run build
    
    > XXX@0.1.0 build C:work官网XXX
    > vue-cli-service build
    
    'vue-cli-service' 不是内部或外部命令,也不是可运行的程序
    或批处理文件。
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! XXX@0.1.0 build: `vue-cli-service build`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the precision-static-website@0.1.0 build script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    npm WARN Local package.json exists, but node_modules missing, did you mean to install?
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:software
    odejs
    ode-cache\_logs2019-12-18T02_46_15_060Z-debug.log
    

    提示 没有这个文件
    npm WARN Local package.json exists, but node_modules missing, did you mean to install?
    我们使用以下命令
    npm install
    就有了

     C:work官网XXX>npm install
    
    > yorkie@2.0.0 install C:work官网XXX
    ode_modulesyorkie
    > node bin/install.js
    
    setting up Git hooks
    done
    
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modulesfsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
    
    added 1081 packages from 888 contributors in 520.336s
    
    
    C:work官网XX>npm --version
    6.12.0
    
    C:work官网XXX>vue --version
    @vue/cli 4.1.1
    

    再次使用 npm run build

    C:work官网XXX>npm run build
    
    > XX@0.1.0 build C:work官网XX
    > vue-cli-service build
    
    
      Building for production...Browserslist: caniuse-lite is outdated. Please run next command `npm update`
    |  Building for production...Browserslist: caniuse-lite is outdated. Please run next command `npm update`
    Browserslist: caniuse-lite is outdated. Please run next command `npm update`
      Building for production...Browserslist: caniuse-lite is outdated. Please run next command `npm update`
    Browserslist: caniuse-lite is outdated. Please run next command `npm update`
    Browserslist: caniuse-lite is outdated. Please run next command `npm update`
    |  Building for production...Browserslist: caniuse-lite is outdated. Please run next command `npm update`
    Browserslist: caniuse-lite is outdated. Please run next command `npm update`
      Building for production...
    
     WARNING  Compiled with 1 warnings                                                            11:06:25
    
     warning
    
    asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
    This can impact web performance.
    Assets:
      img/logo.ea6c7d15.png (482 KiB)
      img/contact-us-sale.709f89e2.jpg (676 KiB)
    
      File                                    Size              Gzipped
    
      distjschunk-vendors.250c06ed.js       112.38 KiB        39.98 KiB
      distjsapp.95fe4f6b.js                 16.92 KiB         6.63 KiB
      distjschunk-44f30854.a11672a8.js      11.85 KiB         5.08 KiB
      distjschunk-62954215.a2594c94.js      7.66 KiB          6.05 KiB
      distjschunk-3b4a32e6.3940e945.js      6.40 KiB          2.03 KiB
      distjschunk-1f894192.edce9cda.js      4.92 KiB          2.48 KiB
      distjschunk-d9983780.7be8d9ab.js      4.11 KiB          3.01 KiB
      distcsschunk-44f30854.110731d3.css    16.18 KiB         2.41 KiB
      distcssapp.ceab4039.css               13.54 KiB         2.85 KiB
      distcsschunk-1f894192.08186c21.css    10.34 KiB         1.89 KiB
      distcsschunk-62954215.ec1a6697.css    5.88 KiB          1.20 KiB
      distcsschunk-3b4a32e6.5808cbb2.css    5.73 KiB          1.10 KiB
      distcsschunk-d9983780.8e490963.css    5.18 KiB          1.04 KiB
    
      Images and other types of assets omitted.
    
     DONE  Build complete. The dist directory is ready to be deployed.
     INFO  Check out deployment instructions at https://cli.vuejs.org/guide/deployment.html
    
    C:work官网XXXX>
    

    成功

  • 相关阅读:
    推荐一些学习软件编程的网站
    Git总结笔记2-克隆远程仓库到本地
    Git总结笔记3-把本地仓库推送到github
    Git总结笔记1-搭建和使用30条简明笔记
    【师兄笔记】Java记录生活
    【师兄笔记】Java入门
    学习软件技术的那些事?
    Java编程基础
    献给还不知道怎么坚持的你
    GIT 检查、撤销修改简明教程
  • 原文地址:https://www.cnblogs.com/lph970417/p/12058862.html
Copyright © 2020-2023  润新知