vue install five error encountered Summary

 

  Foreword

    This blog will not teach you how to install vue, but will inform the five problems that may be encountered during installation

     2017 I wrote install vue blog, details: https://www.cnblogs.com/tu-0718/p/7521099.html

 

 

  5 error

    ①: If you use vue -V prompt command not found when the query is installed vue, may be you have not installed vue-cli Scaffolding (vue-cli can quickly create vue project)

            

       

 

       ②: VUE installation Taobao mirror error, suggesting invalid configuration, you must be a fully qualified http address, because I url plus a front 1 blank spaces where no spaces

        Note: After installing Taobao mirroring, you need to use npm place can be used cnpm replaced, but it is recommended to install modules and plug-ins with cnpm , and start packing vue with npm

        (Cnpm is the mirror, npm server in a foreign country, solid cnpm installation is faster, but may not lead to timely updates occur some unexpected problems)

           

 

 

        ③: If the direct use npm run dev  command will run error, suggesting no such file or directory, you need to create a project

           

           Use VUE WebPACK vue_test the init (vue_test project name) to create a project, and then be selected as necessary,

        No (Y / n) let you select options directly enter if installed, the Y- mounted, the n- is not installed

           

 

 

      ④: If enter the project directory, enter npm run dev when prompted did not find the item, explain your project path is wrong, check the project path and enter the command correctly 

        Here is the project path entered incorrectly, copy the path and paste directly into the git bash (equivalent to the windows of cmd ) will become a path slash '\' , should actually use '/' ,

      

      Note: In the git bash can not directly copy the project path ctrl + v to paste directly click of the mouse wheel to paste

 

 

    ⑤: Enter npm install installation dependencies, if the prompt FIG.

      审核了11959个包发现12个漏洞(7个中等,5个高危)运行`npm audit fix`来修复它们,

      或者运行`npm audit`来获取详细信息,这里直接输入npm audit fix修复即可

         

           接着会出现下图所示,告知你已修复其中一些漏洞,还需输入npm audit fix --force 进一步修复

           

          然后看到下面提示在输入npm audit即可

           

           最后当你看到下图所示,说明你已经完全修复了漏洞

           

         注:原文参考

 

 

    补充:

     ①:运行npm run dev 后自动打开浏览器设置(默认是手动打开)

         config-index.js,然后找到 autoOpenBrowser: false, 把false改为true即可

      ②:若你想终止启动vue,不想每次都重复下面3个步骤

        cd "项目路径"

           npm install

          npm run dev

            可直接ctrl+c会出现下图所示,根据提示选Y,此时只需在输入一次 npm run dev 即可

       

 

Guess you like

Origin www.cnblogs.com/tu-0718/p/11000182.html