当前位置:网站首页>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
边栏推荐
- js中,字符串和数组互转(二)——数组转为字符串的方法
- MySQL - transaction details
- Tips for web development: skillfully use ThreadLocal to avoid layer by layer value transmission
- OneNote in-depth evaluation: using resources, plug-ins, templates
- [go][转载]vscode配置完go跑个helloworld例子
- Aike AI frontier promotion (7.6)
- 14年本科毕业,转行软件测试,薪资13.5K
- In JS, string and array are converted to each other (II) -- the method of converting array into string
- @Detailed differences among getmapping, @postmapping and @requestmapping, with actual combat code (all)
- string的底层实现
猜你喜欢

Is this the feeling of being spoiled by bytes?

麦趣尔砸了小众奶招牌

Summary of cross partition scheme

抖音将推独立种草App“可颂”,字节忘不掉小红书?

Michael smashed the minority milk sign

20220211 failure - maximum amount of data supported by mongodb

PostgreSQL 修改数据库用户的密码

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

Aike AI frontier promotion (7.6)

Internet News: Geely officially acquired Meizu; Intensive insulin purchase was fully implemented in 31 provinces
随机推荐
FZU 1686 龙之谜 重复覆盖
C language char, wchar_ t, char16_ t, char32_ Relationship between T and character set
Shake Sound poussera l'application indépendante de plantation d'herbe "louable", les octets ne peuvent pas oublier le petit livre rouge?
首批入选!腾讯安全天御风控获信通院业务安全能力认证
First batch selected! Tencent security tianyufeng control has obtained the business security capability certification of the ICT Institute
Is this the feeling of being spoiled by bytes?
[sliding window] group B of the 9th Landbridge cup provincial tournament: log statistics
Comparison between multithreaded CAS and synchronized
After working for 5 years, this experience is left when you reach P7. You have helped your friends get 10 offers
【滑动窗口】第九届蓝桥杯省赛B组:日志统计
el-table表格——获取单击的是第几行和第几列 & 表格排序之el-table与sort-change、el-table-column与sort-method & 清除排序-clearSort
The underlying implementation of string
VIM basic configuration and frequently used commands
SDL2来源分析7:演出(SDL_RenderPresent())
npm run dev启动项目报错 document is not defined
JS method to stop foreach
HMS core machine learning service creates a new "sound" state of simultaneous interpreting translation, and AI makes international exchanges smoother
guava:创建immutableXxx对象的3种方式
KDD 2022 | realize unified conversational recommendation through knowledge enhanced prompt learning
Nodejs教程之让我们用 typescript 创建你的第一个 expressjs 应用程序