当前位置:网站首页>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
边栏推荐
- Yyds dry inventory run kubeedge official example_ Counter demo counter
- Redistemplate common collection instructions opsforzset (VI)
- Redistemplate common collection instructions opsforset (V)
- Torch Cookbook
- After working for 5 years, this experience is left when you reach P7. You have helped your friends get 10 offers
- Comparison between multithreaded CAS and synchronized
- 爬虫实战(五):爬豆瓣top250
- Vim 基本配置和经常使用的命令
- 互联网快讯:吉利正式收购魅族;胰岛素集采在31省全面落地
- 14 years Bachelor degree, transferred to software testing, salary 13.5k
猜你喜欢
3D人脸重建:从基础知识到识别/重建方法!
快讯:飞书玩家大会线上举行;微信支付推出“教培服务工具箱”
JPEG2000 matlab source code implementation
Happy sound 2[sing.2]
PostgreSQL 安装gis插件 CREATE EXTENSION postgis_topology
[redis design and implementation] part I: summary of redis data structure and objects
一行代码可以做些什么?
Set up a time server
Absolute primes (C language)
中国白酒的5场大战
随机推荐
3D face reconstruction: from basic knowledge to recognition / reconstruction methods!
[interpretation of the paper] machine learning technology for Cataract Classification / classification
npm run dev启动项目报错 document is not defined
Enhance network security of kubernetes with cilium
跨分片方案 总结
Why do job hopping take more than promotion?
js之遍历数组、字符串
C language: comprehensive application of if, def and ifndef
爬虫实战(五):爬豆瓣top250
Explain ESM module and commonjs module in simple terms
Replace Internet TV set-top box application through digital TV and broadband network
How do I remove duplicates from the list- How to remove duplicates from a list?
Is it profitable to host an Olympic Games?
启动嵌入式间:资源有限的系统启动
[sliding window] group B of the 9th Landbridge cup provincial tournament: log statistics
Guava: use of multiset
Vim 基本配置和经常使用的命令
Torch Cookbook
Numpy download and installation
First batch selected! Tencent security tianyufeng control has obtained the business security capability certification of the ICT Institute