【报错】无法找到模块“element-plus/es/locale/index.mjs”的声明文件。

报错:

无法找到模块"element-plus/es/locale/index.mjs"的声明文件。"E:/codeAll/work/test1/test2/HealinLikeMe-ui/node_modules/.pnpm/element-plus@2.7.3_vue@3.4.27_typescript@5.4.5_/node_modules/element-plus/es/locale/index.mjs"隐式拥有 "any" 类型。
There are types at xxxxxx/node_modules/element-plus/es/locale/index.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.

解决:

将报错部分的"index.mjs"的后缀.mjs删除

变成如下部分,就没有报错了

相关推荐
君顾15 分钟前
折扣卡 CPS 小程序定制:从业务流程到系统架构的实践指南
java·开发语言·折扣卡
坚定学代码1 小时前
static在c++中的使用
开发语言·c++
云上工程笔记1 小时前
AstraFlow + React/Vite:如何用自然语言开发并部署一个 AI 咖啡网站原型
前端·人工智能·react.js
Q一件事1 小时前
ArcGIS中TypeError: can‘t multiply sequence by non-int of type ‘str‘错误
前端·javascript·arcgis
云雀衔光2 小时前
Java Spring AI MCP:在 Spring 里把 AI 接上你的业务系统
java·开发语言·人工智能·后端·测试工具·spring
美狐美颜SDK开放平台2 小时前
从视频处理到实时渲染:直播APP中视频美颜SDK的关键技术解析
前端·人工智能·架构·实时互动·音视频·视频美颜sdk
重生之小比特2 小时前
【Java SE】数据类型与变量
java·开发语言·python
Yeniden2 小时前
Java 后端从零到企业级:第1篇 Java 基础语法——变量、数据类型与运算符
java·开发语言·apache
WeiXin_DZbishe2 小时前
基于springboot大学生提问箱系统-计算机毕设【课程设计】72593
javascript·vue.js·spring boot·vscode·python·node.js·php
yume_sibai2 小时前
ES6 核心知识点完全总结(变量 + 箭头函数 + 解构 + Promise + 模块化)
前端·ecmascript·es6