在使用VSCode添加项目报错Vetur-‘jsconfig.json-t-的解决方法-‘tsconfig.json-find-or-can

教程大全 2026-01-30 14:25:10 浏览

现在有小伙伴反映在使用VSCode添加项目报错Vetur can’t find ‘tsconfig.on’ or ‘jsconfig.json’下面给Target="_blank">大家介绍一下解决方式:

在使用Vetur 0.31.0版本时当需要新增了一个带有“vetur.config.js”的文件,在这个Vetur 0.31.0版本之后,需要优先查找项目中有没有带有tsconfig.json(ts项目)或者jsconfig.json(js项目),没找到这2个文件就去找vetur.config.js,如果都没有,就会抛出这个提示。

JavaScript可支持两种不同模式(文件范围、显式项目)下的运行:

在没有”jsconfig.json”文件范围这种模式下,VSCode中打开该文件为一个独立单元,只要文件a.js没有显式引用文件b.ts,两个文件之间就没有共同的项目上下文。

存在并使用jsconfig.json即为显式项目:

显示项目是通过该文件定义的。如果目录中存在该类文件就表示,此目录为根目录。在工作空间中想要JavaScript体验得到改进,需要定义项目上下文的jsconfig.json文件。

1.配置Vetur插件,忽略提示:

vetur.ignoreProjectWarning: true

2.在项目根目录创建jsconfig.json文件,加入代码:

{"include": ["./src/*"]}

3.在项目根目录创建vetur.config.js文件,加入代码:

module.exports = {// vetur配置,会覆盖vscode中的设置。default: `{}`settings: {"vetur.useWorkspaceDependencies": true,"vetur.experimental.templateInterpolationService": true},// 普通项目采用默认配置 default: `[{ root: './' }]`}

以上是关于“在使用VSCode添加项目报错Vetur can’t find ‘tsconfig.json’ or ‘jsconfig.json’的解决方法”的介绍,如需购买云服务器,推荐 酷番云 ,独享IP、齐备,各类配置均有,最低只需要43/月,免费帮助配置环境,挂载磁盘等,协助处理简单问题,同时提供快速0元备案,让你快速运营。

选购地址:

find

树莓派跑Python程序出错

在 /home/pi/ 下找到名为autostart的文件夹,如果没有就新创建一个。在该文件夹下创建一个文件,文件名自拟,后缀必须是desktop,文件内容如下:[Desktop Entry]Name=testComment=Python ProgramExec=python /home/pi/=/home/pi/python_games/4row_=falseMultipleArgs=falseType=ApplicationCategories=Application;Development;StartupNotify=true

asp中过滤或屏蔽文字

在源代码里删除就是了

extjs5中tabpanel鼠标右键全部关闭如何实现?

给你例子参考,关联到右键就可以了/** * Plugin for adding a close context menu to tabs. Note tHat the menu respects * the closable configuration on the tab. As such, commands like remove others * and remove all will not remove items that are not closable. */(, {alias: ,mixins: {observable: },/** * @cfg {String} closeTabText * The text for closing the current tab. */closeTabText: Close Tab,/** * @cfg {Boolean} showCloseOthers * Indicates whether to show the Close Others option. */showCloseOthers: true,/** * @cfg {String} closeOthersTabsText * The text for closing all tabs except the current one. */closeOthersTabsText: Close Other Tabs,/** * @cfg {Boolean} showCloseAll * Indicates whether to show the Close All option. */showCloseAll: true,/** * @cfg {String} closeAllTabsText * The text for closing all tabs. */closeAllTabsText: Close All Tabs,/** * @cfg {Array} extraItemsHead * An array of additional context menu items to add to the front of the context menu. */extraItemsHead: null,/** * @cfg {Array} extraItemsTail * An array of additional context menu items to add to the end of the context menu. */extraItemsTail: null,// TODO - doc (aftermenu,beforemenu);//publicconstructor: function (config) {(this, config);},init : function(tabpanel){ = tabpanel; = (tabbar);(, {scope: this,afterlayout: ,single: true});},onAfterLayout: function() {(, {scope: this,contextmenu: ,delegate: .x-tab});},onBeforeDestroy : function(){();(arguments);},// privateonContextMenu : function(event, target){var me = this,menu = (),disableAll = true,disableOthers = true,tab = (target),index = (tab); = (index);(#close)(!);if ( || ) {(function(item) {if () {disableAll = false;if (item != ) {disableOthers = false;return false;}}return true;});if () {(#closeAll)(disableAll);}if () {(#closeOthers)(disableOthers);}}();(beforemenu, menu, , me);(());},createMenu : function() {var me = this;if (!) {var items = [{itemId: close,text: ,scope: me,handler: }];if ( || ) {(-);}if () {({itemId: closeOthers,text: ,scope: me,handler: });}if () {({itemId: closeAll,text: ,scope: me,handler: });}if () {items = (items);}if () {items = ();} = (, {items: items,listeners: {hide: ,scope: me}});}return ;},onHideMenu: function () {var me = this;(aftermenu, , me);},onClose : function(){();},onCloseOthers : function(){(true);},onCloseAll : function(){(false);},doClose : function(excludeActive){var items = [];(function(item){if(){if(!excludeActive || item != ){(item);}}}, this);();(items, function(item){(item);}, this);(true);}});

本文版权声明本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,请联系本站客服,一经查实,本站将立刻删除。

发表评论

热门推荐