当前位置:网站首页>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
边栏推荐
- JS according to the Chinese Alphabet (province) or according to the English alphabet - Za sort &az sort
- Aike AI frontier promotion (7.6)
- Caching strategies overview
- 50 commonly used numpy function explanations, parameters and usage examples
- Ravendb starts -- document metadata
- Yuan Xiaolin: safety is not only a standard, but also Volvo's unchanging belief and pursuit
- 14 years Bachelor degree, transferred to software testing, salary 13.5k
- 语谱图怎么看
- string的底层实现
- Five wars of Chinese Baijiu
猜你喜欢
After working for 5 years, this experience is left when you reach P7. You have helped your friends get 10 offers
Yuan Xiaolin: safety is not only a standard, but also Volvo's unchanging belief and pursuit
Set up a time server
[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
20220211 failure - maximum amount of data supported by mongodb
Chris LATTNER, the father of llvm: why should we rebuild AI infrastructure software
Aike AI frontier promotion (7.6)
[interpretation of the paper] machine learning technology for Cataract Classification / classification
2022 fields Award Announced! The first Korean Xu Long'er was on the list, and four post-80s women won the prize. Ukrainian female mathematicians became the only two women to win the prize in history
随机推荐
MySQL - 事务(Transaction)详解
ROS error: could not find a package configuration file provided by "move_base“
C语言:#if、#def和#ifndef综合应用
038. (2.7) less anxiety
Is this the feeling of being spoiled by bytes?
Description of web function test
14 years Bachelor degree, transferred to software testing, salary 13.5k
What about the spectrogram
抖音将推独立种草App“可颂”,字节忘不掉小红书?
Absolute primes (C language)
jvm:大对象在老年代的分配
Explain ESM module and commonjs module in simple terms
代理和反向代理
3D人脸重建:从基础知识到识别/重建方法!
分糖果
Technology sharing | packet capturing analysis TCP protocol
C# 如何在dataGridView里设置两个列comboboxcolumn绑定级联事件的一个二级联动效果
Univariate cubic equation - relationship between root and coefficient
js通过数组内容来获取数组下标
Is it profitable to host an Olympic Games?