当前位置:网站首页>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
边栏推荐
- This year, Jianzhi Tencent
- 袁小林:安全不只是标准,更是沃尔沃不变的信仰和追求
- JS learning notes OO create suspicious objects
- Chris LATTNER, the father of llvm: why should we rebuild AI infrastructure software
- ViT论文详解
- VIM basic configuration and frequently used commands
- Enhance network security of kubernetes with cilium
- 一行代码可以做些什么?
- JS学习笔记-OO创建怀疑的对象
- [sliding window] group B of the 9th Landbridge cup provincial tournament: log statistics
猜你喜欢

After working for 5 years, this experience is left when you reach P7. You have helped your friends get 10 offers

对话阿里巴巴副总裁贾扬清:追求大模型,并不是一件坏事

Internet News: Geely officially acquired Meizu; Intensive insulin purchase was fully implemented in 31 provinces

Shake Sound poussera l'application indépendante de plantation d'herbe "louable", les octets ne peuvent pas oublier le petit livre rouge?

中国白酒的5场大战

50 commonly used numpy function explanations, parameters and usage examples

JPEG2000 matlab source code implementation

PostgreSQL 修改数据库用户的密码

Z function (extended KMP)

Tiktok will push the independent grass planting app "praiseworthy". Can't bytes forget the little red book?
随机推荐
一行代码可以做些什么?
Description of web function test
PostgreSQL 修改数据库用户的密码
FZU 1686 龙之谜 重复覆盖
通过数字电视通过宽带网络取代互联网电视机顶盒应用
Forward maximum matching method
@GetMapping、@PostMapping 和 @RequestMapping详细区别附实战代码(全)
爬虫实战(五):爬豆瓣top250
[interpretation of the paper] machine learning technology for Cataract Classification / classification
From campus to Tencent work for a year of those stumbles!
Fzu 1686 dragon mystery repeated coverage
ROS error: could not find a package configuration file provided by "move_base“
Redistemplate common collection instructions opsforlist (III)
The difference between break and continue in the for loop -- break completely end the loop & continue terminate this loop
强化学习-学习笔记5 | AlphaGo
Five wars of Chinese Baijiu
Hill | insert sort
KDD 2022 | realize unified conversational recommendation through knowledge enhanced prompt learning
js中,字符串和数组互转(二)——数组转为字符串的方法
Torch Cookbook