当前位置:网站首页>NPM run dev start project error document is not defined
NPM run dev start project error document is not defined
2022-07-06 21:41:00 【hongc93】
npm run dev Start up project error document is not defined A difficult problem
background : When the interface call fails, you should give the user an error pop-up message , Give the papers request.js of use import Method is introduced separately element-ui Under the Message and Message.box Components , Report errors The screenshot is as follows :
ReferenceError: document is not defined
at Object.<anonymous> (G:\cd\node_modules\element-ui\lib\utils\dom.js:22:39)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Module._compile (G:\cd\node_modules\pirates\lib\index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Object.newLoader [as .js] (G:\cd\node_modules\pirates\lib\index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (G:\cd\node_modules\element-ui\lib\utils\popup\popup-manager.js:9:12)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Module._compile (G:\cd\node_modules\pirates\lib\index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Object.newLoader [as .js] (G:\cd\node_modules\pirates\lib\index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:599:32
After checking bit by bit , Found other references request.js There is no problem with the interface files , Only login Interface file reference error .
All kinds of checks What's the reason ? Unsolved You know, great Xia, you can help solve your doubts , thank you
But if you just have to use pop-up components You can use the following methods
//1. First introduce `vue`
import Vue from 'vue'
//2. establish vue Example
let v = new Vue()
//3. adopt vue Instance call component
v.$message.success(' Content ')
It's finally done ! Goodbye for a long time
边栏推荐
- [go][转载]vscode配置完go跑个helloworld例子
- 【滑动窗口】第九届蓝桥杯省赛B组:日志统计
- 缓存更新策略概览(Caching Strategies Overview)
- jvm:大对象在老年代的分配
- 袁小林:安全不只是标准,更是沃尔沃不变的信仰和追求
- ACdreamoj1110(多重背包)
- C# 如何在dataGridView里设置两个列comboboxcolumn绑定级联事件的一个二级联动效果
- Explain ESM module and commonjs module in simple terms
- 1292_FreeROS中vTaskResume()以及xTaskResumeFromISR()的实现分析
- KDD 2022 | realize unified conversational recommendation through knowledge enhanced prompt learning
猜你喜欢
Efficiency tool +wps check box shows the solution to the sun problem
[Li Kou brushing questions] one dimensional dynamic planning record (53 change exchanges, 300 longest increasing subsequence, 53 largest subarray and)
HMS core machine learning service creates a new "sound" state of simultaneous interpreting translation, and AI makes international exchanges smoother
【力扣刷题】一维动态规划记录(53零钱兑换、300最长递增子序列、53最大子数组和)
039. (2.8) thoughts in the ward
抖音將推獨立種草App“可頌”,字節忘不掉小紅書?
guava:Collections.unmodifiableXXX创建的collection并不immutable
红杉中国,刚刚募资90亿美元
[in depth learning] pytorch 1.12 was released, officially supporting Apple M1 chip GPU acceleration and repairing many bugs
numpy 下载安装
随机推荐
爬虫实战(五):爬豆瓣top250
通过数字电视通过宽带网络取代互联网电视机顶盒应用
Web开发小妙招:巧用ThreadLocal规避层层传值
MySQL - 事务(Transaction)详解
Nodejs教程之让我们用 typescript 创建你的第一个 expressjs 应用程序
Tiktok will push the independent grass planting app "praiseworthy". Can't bytes forget the little red book?
Numpy download and installation
El table table - sortable sorting & disordered sorting when decimal and% appear
强化学习-学习笔记5 | AlphaGo
guava: Multiset的使用
Redistemplate common collection instructions opsforzset (VI)
数字化转型挂帅复产复工,线上线下全融合重建商业逻辑
Acdreamoj1110 (multiple backpacks)
HMS core machine learning service creates a new "sound" state of simultaneous interpreting translation, and AI makes international exchanges smoother
袁小林:安全不只是标准,更是沃尔沃不变的信仰和追求
Dialogue with Jia Yangqing, vice president of Alibaba: pursuing a big model is not a bad thing
string的底层实现
一行代码可以做些什么?
Yuan Xiaolin: safety is not only a standard, but also Volvo's unchanging belief and pursuit
Comparison between multithreaded CAS and synchronized