Uncaught ReferenceError: process is not defined 以及 “ERROR in ./node_modules/json-schema-ref-parser/“
2022/2/8 17:14:36
本文主要是介绍Uncaught ReferenceError: process is not defined 以及 “ERROR in ./node_modules/json-schema-ref-parser/“,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
梦幻联动啦 上篇帖子中引用完 @jsonforms时出现如下几个报错
1、ERROR in ./node_modules/json-schema-ref-parser/lib/resolvers/http.js 3:13-28
2、ERROR in ./node_modules/json-schema-ref-parser/lib/resolvers/http.js 5:14-30
3、ERROR in ./node_modules/json-schema-ref-parser/lib/util/url.js 11:0-36
控制台报错内容如下
Uncaught ReferenceError: process is not defined at Object../node_modules/json-schema-ref-parser/lib/util/url.js at Object.options.factory (react refresh:6) at _webpack_require_(bootstrap:24) at fn (hot module replacement:61) at Object../node_modules/json-schema-ref-parser/lib/resolvers/file.js (file.js:4) at _webpack_require_(bootstrap:24) at fn (hot module replacement:61) at Object../node_modules/json-schema-ref-parser/lib/options.js (options.js:8) at Object.options.factory (react refresh:6)
解决方案:网上搜索Uncaught ReferenceError: process is not defined有千百种解决方案 但无一能解决我的bug (有点费脑) 重点看报错中的这句 “BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.” 然后我看了一下我的webpack在项目中是 5.0.0版本
在package.json中 将其改为 4.0.1
然后运行 npm install
最后运行 npm start 该问题即被解决
这篇关于Uncaught ReferenceError: process is not defined 以及 “ERROR in ./node_modules/json-schema-ref-parser/“的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-05-09vue3开发前端表单缓存自定义指令,移动端h5必备插件
- 2024-05-09React Hooks在class组件中的使用方式
- 2024-03-30[OIDC in Action] 2. 基于OIDC(OpenID Connect)的SSO(纯JS客户端)
- 2024-03-29terraform jsonencode
- 2024-03-13vuex-persist
- 2024-03-11icons for vue
- 2024-03-07breadcrumbs react js
- 2024-03-06react login page example
- 2024-03-06react router uselocation
- 2024-03-04postgres jsonb_set