我已将我的应用转移到其他笔记本电脑上,并在控制台中收到此错误。知道为什么会这样吗?
未捕获的ReferenceError:未在以下位置定义进程 对象... / .. / node_modules/@babel/types/lib/definitions/core.js (vendor.js:133069)位于webpack_require(runtime.js:85)位于 对象... / .. / node_modules/@babel/types/lib/definitions/index.js (vendor.js:135192)在webpack_require(runtime.js:85)在 对象... / .. / node_modules/@babel/types/lib/builders/builder.js (vendor.js:130507)在webpack_require(runtime.js:85)在 对象... / .. / node_modules/@babel/types/lib/builders/generated/index.js (vendor.js:130871)在webpack_require(runtime.js:85)在 对象... / .. / node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js (vendor.js:137453)在webpack_require(runtime.js:85)
答案 0 :(得分:1)
将其添加到index.html标头中,然后尝试
<script>
//var global = global || window;//open this if you take global error
//var Buffer = Buffer || [];//open this if you take buffer error
var process = process || {
env: { DEBUG: undefined },
version: []
};
</script>