【报错】无法找到模块“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删除

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

相关推荐
洛小豆19 分钟前
深入理解Pinia:Options API vs Composition API两种Store定义方式完全指南
前端·javascript·vue.js
Jokerator23 分钟前
Vue 2现代模式打包:双包架构下的性能突围战
javascript·vue.js
洛小豆29 分钟前
JavaScript 对象属性访问的那些坑:她问我为什么用 result.id 而不是 result['id']?我说我不知道...
前端·javascript·vue.js
witton29 分钟前
Go语言网络游戏服务器模块化编程
服务器·开发语言·游戏·golang·origin·模块化·耦合
叹一曲当时只道是寻常32 分钟前
Softhub软件下载站实战开发(十六):仪表盘前端设计与实现
前端·golang
超级土豆粉37 分钟前
npm 包 scheduler 介绍
前端·npm·node.js
bug爱好者38 分钟前
原生小程序如何实现跨页面传值
前端·javascript
随笔记41 分钟前
uniapp开发的小程序输入框在ios自动填充密码,如何欺骗苹果手机不让自动填充
前端·ios·app
bug爱好者1 小时前
原生微信小程序最实用的工具函数合集
前端·javascript
3Katrina1 小时前
JS事件机制详解(2)--- 委托机制、事件应用
前端·javascript·面试