vue遇到的问题与疑问

1、初始化vue项目,报错This is probably not a problem with npm,there is likely additional logging output above

原因:版本原因,更新一下

解决方案: 
npm install之后,运行 npm i -D webpack-dev-server@2.9.7

2、引入fontAwson打包完后路径问题

解决方案:在build》utils.js加上图中那一段代码    publicPath:'../../'

3、打包问题注意事项

npm run build之前要在config >index.js中将assetsPublicPath: '/',里面的/删除

页面#不能丢

4、首页显示问题

如果想在页面首页显示第一页,在mian里面加入redirect: 'home'

5、Failed to mount component: template or render function not defined.

页面没有内容

6、报错

/node_modules/css-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-28c15856","scoped":true,"hasInlineConfig":false}!./node_modules/stylus-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/singer-detail/singer-detail.vue
Module build failed: ParseError: D:\music\vue-music\src\components\singer-detail\singer-detail.vue:22:1
   18| .slide-enter-active, .slide-leave-active
   19|     transition: all 0.3s
   20| .slide-enter, .slide-leave-to
   21| transform: translate3d(100%, 0, 0)
   22| 
-------^

expected "indent", got "eos"
原因:css格式不对,因为我用的stylus,所以css代码格式不对会报这个错

 

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值