错误:Cannot find module 'eslint/lib/formatters/stylish'

本文解决了一个常见的NodeJS启动VueJS项目时遇到的编译错误问题,主要原因是缺少了ESLint的stylish格式化模块。通过删除package-lock.json、yarn.lock和node_modules文件夹,然后重新执行npminstall命令来解决问题。

nodejs启动vuejs项目报错

Failed to compile.
./src/index.js
Module build failed: Error: Cannot find module 'eslint/lib/formatters/stylish'
复制代码

错误原因:没有找到对应的模块
解决:
1、删除项目下的package-lock.json 和 yarn.lock文件;
2、删除node_modules文件夹;
3、执行 npm install 重新安装npm包

$(table).bootstrapTable({ url: toBanCache(url), //请求后台的URL(*) method: "get", //请求方式(*) contentType: "application/json", //toolbar: toolbar, //工具按钮用哪个容器 striped: true, //是否显示行间隔色 cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*) pagination: true, //是否显示分页(*) sortable: false, //是否启用排序 sortOrder: "asc", //排序方式 queryParamsType: "undefined",//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder//设置为limit可以获取limit, offset, search, sort, order queryParams: paramsMethod, //传递参数(*),这里应该返回一个object,即形如{param1:val1,param2:val2} sidePagination: "server", //分页方式:client客户端分页,server服务端分页(*) pageNumber: 1, //初始化加载第一页,默认第一页 pageSize: 15, //每页的记录行数(*) pageList: [15], //可供选择的每页的行数(*) search: false, //是否显示表格搜索,此搜索是客户端搜索,不会进服务端,所以,个人感觉意义不大 strictSearch: false, showColumns: false, //是否显示所有的列 showRefresh: false, //是否显示刷新按钮 minimumCountColumns: 2, //最少允许的列数 clickToSelect: true, //是否启用点击选中行 height: tableHeight, //行高,如果没有设置height属性,表格自动根据记录条数觉得表格高度 uniqueId: idField, //每一行的唯一标识,一般为主键列 idField: idField, //指定主键列 showToggle: false, //是否显示详细视图和列表视图的切换按钮 cardView: false, //是否显示详细视图 detailView: false, //是否显示父子表 singleSelect: true,//是否启用单选 columns: createCols(columns, columnWidths, columnAligns, titles, formatters, hasCheckbox) });
06-10
有关调用实时(JIT)调试而不是此对话框的详细信息, 请参见此消息的结尾。 ************** 异常文本 ************** System.InvalidOperationException: DragDrop 注册失败。 ---> System.Threading.ThreadStateException: 在可以调用 OLE 之前,必须将当前线程设置为单线程单元(STA)模式。请确保您的 Main 函数带有 STAThreadAttribute 标记。 在 System.Windows.Forms.Control.SetAcceptDrops(Boolean accept) --- 内部异常堆栈跟踪的结尾 --- 在 System.Windows.Forms.Control.SetAcceptDrops(Boolean accept) 在 System.Windows.Forms.Control.OnHandleCreated(EventArgs e) 在 System.Windows.Forms.TreeView.OnHandleCreated(EventArgs e) 在 System.Windows.Forms.Control.WmCreate(Message& m) 在 System.Windows.Forms.Control.WndProc(Message& m) 在 System.Windows.Forms.TreeView.WndProc(Message& m) 在 Cognex.VisionPro.Implementation.Internal.CogTreeViewBase.CogPaintedTreeView.DefaultWndProc(Message& m) 在 Cognex.VisionPro.Implementation.Internal.CogTreeViewBase.TreeView_WndProcRunning(Object sender, Message& msg, Boolean& cancel) 在 Cognex.VisionPro.Implementation.Internal.CogTreeViewBase.CogPaintedTreeView.OnWndProcRunning(Message& msg, Boolean& cancel) 在 Cognex.VisionPro.Implementation.Internal.CogTreeViewBase.CogPaintedTreeView.WndProc(Message& m) 在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ************** 已加载的程序集 ************** mscorlib 程序集版本:4.0.0.0 Win32 版本:4.8.9195.0 built by: NET481REL1LAST_B 基本代码:file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll ---------------------------------------- Vision-撕胶带 程序集版本:1.0.0.0 Win32 版本:1.0.0.0 基本代码:file:///D:/soft/Debug/Vision-%E6%92%95%E8%83%B6%E5%B8%A6.exe ---------------------------------------- System.Windows.Forms 程序集版本:4.0.0.0 Win32 版本:4.8.9195.0 built by: NET481REL1LAST_B 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System 程序集版本:4.0.0.0 Win32 版本:4.8.9195.0 built by: NET481REL1LAST_B 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Drawing 程序集版本:4.0.0.0 Win32 版本:4.8.9037.0 built by: NET481REL1 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- System.Configuration 程序集版本:4.0.0.0 Win32 版本:4.8.9037.0 built by: NET481REL1 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll ---------------------------------------- System.Core 程序集版本:4.0.0.0 Win32 版本:4.8.9195.0 built by: NET481REL1LAST_B 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll ---------------------------------------- System.Xml 程序集版本:4.0.0.0 Win32 版本:4.8.9037.0 built by: NET481REL1 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- Cognex.VisionPro.Controls 程序集版本:53.2.0.0 Win32 版本:53.2.0.0 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_64/Cognex.VisionPro.Controls/v4.0_53.2.0.0__ef0f902af9dee505/Cognex.VisionPro.Controls.dll ---------------------------------------- Cognex.VisionPro.Display.Controls 程序集版本:53.2.0.0 Win32 版本:53.2.0.0 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_64/Cognex.VisionPro.Display.Controls/v4.0_53.2.0.0__ef0f902af9dee505/Cognex.VisionPro.Display.Controls.dll ---------------------------------------- Cognex.VisionPro.Core 程序集版本:53.2.0.0 Win32 版本: 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_64/Cognex.VisionPro.Core/v4.0_53.2.0.0__ef0f902af9dee505/Cognex.VisionPro.Core.dll ---------------------------------------- mscorlib.resources 程序集版本:4.0.0.0 Win32 版本:4.8.4084.0 built by: NET48REL1 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/mscorlib.resources.dll ---------------------------------------- System.Windows.Forms.resources 程序集版本:4.0.0.0 Win32 版本:4.8.4084.0 built by: NET48REL1 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/System.Windows.Forms.resources.dll ---------------------------------------- Cognex.VisionPro 程序集版本:53.2.0.0 Win32 版本:53.2.0.0 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_64/Cognex.VisionPro/v4.0_53.2.0.0__ef0f902af9dee505/Cognex.VisionPro.dll ---------------------------------------- Cognex.VisionPro.Interop.Core 程序集版本:53.2.0.0 Win32 版本: 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Cognex.VisionPro.Interop.Core/v4.0_53.2.0.0__ef0f902af9dee505/Cognex.VisionPro.Interop.Core.dll ---------------------------------------- Cognex.VisionPro.Display.Controls.resources 程序集版本:53.2.0.0 Win32 版本:53.2.0.0 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Cognex.VisionPro.Display.Controls.resources/v4.0_53.2.0.0_zh-Hans_ef0f902af9dee505/Cognex.VisionPro.Display.Controls.resources.dll ---------------------------------------- Cognex.VisionPro.Interop.DisplayCtl 程序集版本:53.2.0.0 Win32 版本:53.2.0.0 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Cognex.VisionPro.Interop.DisplayCtl/v4.0_53.2.0.0__ef0f902af9dee505/Cognex.VisionPro.Interop.DisplayCtl.dll ---------------------------------------- Serilog 程序集版本:2.0.0.0 Win32 版本:2.12.0.0 基本代码:file:///D:/soft/Debug/Serilog.DLL ---------------------------------------- Serilog.Sinks.Console 程序集版本:4.0.1.0 Win32 版本:4.0.1.0 基本代码:file:///D:/soft/Debug/Serilog.Sinks.Console.DLL ---------------------------------------- Serilog.Sinks.File 程序集版本:5.0.0.0 Win32 版本:5.0.0.0 基本代码:file:///D:/soft/Debug/Serilog.Sinks.File.DLL ---------------------------------------- MvCamCtrl.Net 程序集版本:0.0.0.0 Win32 版本:0.0.0.0 基本代码:file:///D:/soft/Debug/MvCamCtrl.Net.DLL ---------------------------------------- Cognex.VisionPro.ToolGroup 程序集版本:53.2.0.0 Win32 版本:53.2.0.0 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_64/Cognex.VisionPro.ToolGroup/v4.0_53.2.0.0__ef0f902af9dee505/Cognex.VisionPro.ToolGroup.dll ---------------------------------------- System.Runtime.Serialization.Formatters.Soap 程序集版本:4.0.0.0 Win32 版本:4.8.9037.0 built by: NET481REL1 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization.Formatters.Soap/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Runtime.Serialization.Formatters.Soap.dll ---------------------------------------- Cognex.VisionPro.PMAlign 程序集版本:53.2.0.0 Win32 版本: 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_64/Cognex.VisionPro.PMAlign/v4.0_53.2.0.0__ef0f902af9dee505/Cognex.VisionPro.PMAlign.dll ---------------------------------------- Cognex.VisionPro.CalibFix 程序集版本:53.2.0.0 Win32 版本: 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_64/Cognex.VisionPro.CalibFix/v4.0_53.2.0.0__ef0f902af9dee505/Cognex.VisionPro.CalibFix.dll ---------------------------------------- Cognex.VisionPro.Blob 程序集版本:53.2.0.0 Win32 版本: 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_64/Cognex.VisionPro.Blob/v4.0_53.2.0.0__ef0f902af9dee505/Cognex.VisionPro.Blob.dll ---------------------------------------- Cognex.VisionPro.QuickBuild.Core 程序集版本:53.2.0.0 Win32 版本:53.2.0.0 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_64/Cognex.VisionPro.QuickBuild.Core/v4.0_53.2.0.0__ef0f902af9dee505/Cognex.VisionPro.QuickBuild.Core.dll ---------------------------------------- cowsi2ha 程序集版本:0.0.0.0 Win32 版本:4.8.9195.0 built by: NET481REL1LAST_B 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.resources 程序集版本:4.0.0.0 Win32 版本:4.8.4084.0 built by: NET48REL1 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/System.resources.dll ---------------------------------------- Accessibility 程序集版本:4.0.0.0 Win32 版本:4.8.9037.0 built by: NET481REL1 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll ---------------------------------------- Cognex.VisionPro.resources 程序集版本:53.2.0.0 Win32 版本:53.2.0.0 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Cognex.VisionPro.resources/v4.0_53.2.0.0_zh-Hans_ef0f902af9dee505/Cognex.VisionPro.resources.dll ---------------------------------------- Cognex.VisionPro.CorePlus 程序集版本:53.2.0.0 Win32 版本: 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_64/Cognex.VisionPro.CorePlus/v4.0_53.2.0.0__ef0f902af9dee505/Cognex.VisionPro.CorePlus.dll ---------------------------------------- Cognex.VisionPro.ImageFile 程序集版本:53.2.0.0 Win32 版本: 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_64/Cognex.VisionPro.ImageFile/v4.0_53.2.0.0__ef0f902af9dee505/Cognex.VisionPro.ImageFile.dll ---------------------------------------- Cognex.VisionPro.ToolGroup.Controls 程序集版本:53.2.0.0 Win32 版本:53.2.0.0 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_64/Cognex.VisionPro.ToolGroup.Controls/v4.0_53.2.0.0__ef0f902af9dee505/Cognex.VisionPro.ToolGroup.Controls.dll ---------------------------------------- Cognex.VisionPro.Controls.resources 程序集版本:53.2.0.0 Win32 版本:53.2.0.0 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Cognex.VisionPro.Controls.resources/v4.0_53.2.0.0_zh-Hans_ef0f902af9dee505/Cognex.VisionPro.Controls.resources.dll ---------------------------------------- Cognex.VisionPro.ToolGroup.Controls.resources 程序集版本:53.2.0.0 Win32 版本:53.2.0.0 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Cognex.VisionPro.ToolGroup.Controls.resources/v4.0_53.2.0.0_zh-Hans_ef0f902af9dee505/Cognex.VisionPro.ToolGroup.Controls.resources.dll ---------------------------------------- Microsoft.GeneratedCode 程序集版本:1.0.0.0 Win32 版本:4.8.9037.0 built by: NET481REL1 基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- ************** JIT 调试 ************** 要启用实时(JIT)调试, 该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置 jitDebugging 值。 编译应用程序时还必须启用 调试。 例如: <configuration> <system.windows.forms jitDebugging="true" /> </configuration> 启用 JIT 调试后,任何未经处理的异常 都将被发送到在此计算机上注册的 JIT 调试程序, 而不是由此对话框处理。
05-29
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值