当前位置:网站首页>options has an unknown property ‘before‘
options has an unknown property ‘before‘
2022-07-17 01:28:00 【Revin050】
文章目录
标题记录开发时遇到的一个小问题
开发时遇到如下报错
ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options has an unknown property ‘before’. These properties are valid:
object { allowedHosts?, bonjour?, client?, compress?, devMiddleware?, headers?, historyApiFallback?, host?, hot?, http2?, https?, ipc?, liveReload?, magicHtml?, onAfterSetupMiddleware?, onBeforeSetupMiddleware?, onListening?, open?, port?, proxy?, server?, setupExitSignals?, setupMiddlewares?, static?, watchFiles?, webSocketServer? }
根据错误提示可知,before已经被移除。
我之前创建项目时用的vue/cli是5.0.0版本。before的功能已经被修改成其他的API。找到node_modules/@vue/cli-service/lib/commands/serve.js文件。可以发现vue/[email protected]与vue/[email protected]的区别。

通过上图可以看到vue/[email protected]中的before已经融合到vue/[email protected]中,为了解决这个问题,也为了以后开发更加稳定,我采取了降cli版本的方法重新搭建项目。
$ npm uninstall -g @vue/cli //卸载当前版本
$ npm install -g @vue/[email protected]版本号 // 例如npm install -g @vue/[email protected]
最终问题解决。
边栏推荐
- Wechat applet
- Laravel's problem
- Leetcode: 0-1 knapsack problem in dynamic programming [come and set the template directly]
- Zabbix6.0 monitoring vcenter7.0
- [Jianzhi offer] 31-35 questions (judge whether a sequence is one of the out of stack sequences, sequence print binary tree, branch print, and reverse print each line), judge whether the sequence is th
- 论文阅读:U-Net++: Redesigning Skip Connections to Exploit Multiscale Features in Image Segmentation
- Yolov5 opencv DNN reasoning
- Latest installation tutorial of VMware Tools (rhel8)
- Ext JS的数字类型处理及便捷方法
- Flutter开发:运行flutter upgrade命令报错Exception:Flutter failed to create a directory at…解决方法
猜你喜欢

Using gatekeeper to restrict kubernetes to create specific types of resources

Polynomial interpolation fitting (II)

机器学习库Scikit-Learn(线性模型、岭回归、插入一列数据(insert)、提取所需列、向量机(SVM)、聚类)

The third day of the three questions of Luogu daily (make up on the fourth day)

代理模式——B站动力节点

About 1000base-t1 1000Base-TX and 100base-t1

Yolov5 opencv DNN reasoning
![[NoSQL] redis high availability and persistence](/img/73/53580db08b33c06c595fb3dfd6abce.png)
[NoSQL] redis high availability and persistence

MYSQL主从搭建

MySQL master-slave setup
随机推荐
Configure high availability using virtual ip+kept
Oracle queries the host name and the corresponding IP address
This is a mathematical problem
XX市高中网络拓扑整体规划配置
第二章 线性表
第一章 绪论
Unity solves the problem of Z-fighting caused by overlapping objects with the same material
基于Matlab的男女声音信号分析与处理
洛谷每日三题之第四天
10. Redis 面试常见问答
Solve the error of 0x00000709 when win10 connects to the shared printer
leetcode162. Looking for peak
Ext JS的数字类型处理及便捷方法
Use RZ, SZ commands to upload and download files through xshell7
Yolov6 learning first chapter
Leetcode: 0-1 knapsack problem in dynamic programming [come and set the template directly]
Method of realizing horizontal and vertical centering of unknown width and height elements
2002 - Can‘t connect to server on ‘127.0.0.1‘ (36)
367. Effective complete square (necessary for entry)
In depth understanding of machine learning - unbalanced learning: sample sampling technology - [smote sampling method and borderline smote sampling method of manual sampling technology]