我使用单个 html 页面创建了一个非常简单的 Vue 项目。我在这里学习教程:youtube.com/watch?v=REqu-nKek-o
相关代码为:
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Vue + Axios demo</title>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>
我的错误是:
Source map error: ReferenceError: WebAssembly is not defined Resource URL: https://unpkg.com/axios/dist/axios.min.js Source Map URL: axios.min.mapj
我尝试了几个不同的 cdn,但我仍然得到 WebAssembly is not defined
。
我读了here这在节点 v8 中得到了解决。由于我使用的是 v11,所以这一定不是我的问题。
$ node --version
v11.7.0
我看到一条警告,提示这可能是一个糟糕的问题。我正在尽力提出一个好问题。我已经通过互联网搜索对此进行了几天的研究。我想我现在根本没有足够的开发经验来提出更好的问题,但我愿意接受任何改进建议。
最佳答案
我就是这样解决的。我安装了更新版本的 nodejs:
https://nodejs.org/en/download/
8.0 之后的任何版本都可以。
我花了一段时间才弄明白。我的错误与 bootstrap 4 中的 bootstrap.min.css 有关:
源图错误:ReferenceError: WebAssembly is not defined
关于javascript - 我如何解决 : ReferenceError: WebAssembly is not defined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54800822/