当前位置:网站首页>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:32After 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
边栏推荐
- Guava: use of multiset
- R language for text mining Part4 text classification
- Comparison between multithreaded CAS and synchronized
- Tips for web development: skillfully use ThreadLocal to avoid layer by layer value transmission
- Vim 基本配置和经常使用的命令
- 字符串的使用方法之startwith()-以XX开头、endsWith()-以XX结尾、trim()-删除两端空格
- What's the best way to get TFS to output each project to its own directory?
- 抖音將推獨立種草App“可頌”,字節忘不掉小紅書?
- 抖音将推独立种草App“可颂”,字节忘不掉小红书?
- Dialogue with Jia Yangqing, vice president of Alibaba: pursuing a big model is not a bad thing
猜你喜欢
![[Digital IC manual tearing code] Verilog automatic beverage machine | topic | principle | design | simulation](/img/75/c0656c4890795bd65874b4f2b16462.jpg)
[Digital IC manual tearing code] Verilog automatic beverage machine | topic | principle | design | simulation

中国白酒的5场大战

Enhance network security of kubernetes with cilium

PostgreSQL 修改数据库用户的密码

JPEG2000-Matlab源码实现

Summary of cross partition scheme
![Happy sound 2[sing.2]](/img/ca/1581e561c427cb5b9bd5ae2604b993.jpg)
Happy sound 2[sing.2]

抖音將推獨立種草App“可頌”,字節忘不掉小紅書?

Five wars of Chinese Baijiu

3D face reconstruction: from basic knowledge to recognition / reconstruction methods!
随机推荐
R language for text mining Part4 text classification
The use method of string is startwith () - start with XX, endswith () - end with XX, trim () - delete spaces at both ends
MySQL - 事务(Transaction)详解
mysql根据两个字段去重
Nodejs教程之Expressjs一篇文章快速入门
C language: comprehensive application of if, def and ifndef
ACdreamoj1110(多重背包)
Description of web function test
Proxy and reverse proxy
document. Usage of write () - write text - modify style and position control
Sdl2 source analysis 7: performance (sdl_renderpresent())
Nodejs tutorial expressjs article quick start
SDL2来源分析7:演出(SDL_RenderPresent())
JPEG2000-Matlab源码实现
1D convolution detail
[go][reprint]vscode run a HelloWorld example after configuring go
numpy 下载安装
Redistemplate common collection instructions opsforhash (IV)
038. (2.7) less anxiety
【力扣刷题】32. 最长有效括号