ReferenceError:未定义Vue

时间:2019-03-11 05:27:36

标签: javascript vue.js

我正试图重建我的投资组合并将其迁移到Vue。这是我第二个使用Vue的项目,我不确定为什么,但是我不断收到错误消息,说main.js文件中没有定义Vue(这是我构建所有vue组件的地方,等等)。
ReferenceError: Vue is not defined
Here is a link to the project repo on gitlab
任何帮助将不胜感激!

1 个答案:

答案 0 :(得分:0)

我相信这是因为main.js出现在index.html中的vuedev.js之前。

https://gitlab.com/KayDeeJay/kevins-portfolio/blob/master/index.html#L9-10

相关问题:Order of JavaScript <script> tag executions not guaranteed in major browsers?

  出现在<script></script>标签之间的

JavaScript语句是按出现顺序执行的;当一个文件中出现多个脚本时,这些脚本将按照它们出现的顺序执行。