vue cannot get / 报错。。。

Posted wangbg

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vue cannot get / 报错。。。相关的知识,希望对你有一定的参考价值。

问题描述:旧电脑退休,把项目拷贝到新电脑上之后,运行不起来了竟然,报错

cannot get /

解决方法:找了很多方法不行,因为代码在旧电脑可以运行,那就肯定是环境的问题了,准备尝试再初始化一个项目看看啥效果,一不小心就找到了iview项目的初始化流程,对,我的项目是基于iview的推荐工程起步的

//Install
// install dependencies
npm install
//Run
//Development
// For the first time, run init to create index.html
npm run init
npm run dev
//Production(Build)
npm run build

初始化流程走一遍之后,完美运行起来了又,Nice

以上是关于vue cannot get / 报错。。。的主要内容,如果未能解决你的问题,请参考以下文章