美文网首页
vue运行、打包时出现的错误

vue运行、打包时出现的错误

作者: 詹小云 | 来源:发表于2017-03-22 10:48 被阅读0次

    problem1:

    when i start my webpack ,it has a problem:Path must be a string.

    错误信息

    hm..see the problem,i checked my path at first,but nothing.later,i went to stack overflow and issues to find the resolution.howerver,so many people agree with that downgraded to node 5.
    finally,it works

    work

    problem2:

    in The node API for "babel" has been moved to "babel-core"

    solution:
    1.uninstall babel
    2.install babel-core
    3.fix webpack.config.js and package.json

    problem3:

    语法错误:出现不该出现的{

    error info

    我一直以为语法错误是很好解决的,找到那个地方改一下就行了。然而这一次却不是这样,我找到了那个vue文件,修改了好多次,直到我把所有的style都注释掉,才没有显示此错误。可是很奇怪啊,明明我的语法又没错。我觉得很可能又是版本问题,降级了webpack后,别的地方又报错,gg。
    后来折腾了好久,发现又是版本号问题,将node弄为6就好了。:)
    6比较稳定。:)

    反正最后的总结就是一定要看看官网的稳定版的是哪个,简直是血泪史:)

    相关文章

      网友评论

          本文标题:vue运行、打包时出现的错误

          本文链接:https://www.haomeiwen.com/subject/nlgnnttx.html