项目场景:
新创建的vue3项目,根据elementplus官网安装步骤进行按需导入安装,运行项目报错
This is probably not a problem with npm.There is likely additional logging output above.
原因分析:
是elementplus安装版本和自动加载方法的版本不适应的造成的。
具体问题:
具体报错信息: Cannot find module 'node:module'


解决方案:
卸载已安装的elementplus和自动导入包的插件。
安装指定版本的elementplus和插件
npm install [email protected] --save
npm install -D [email protected] [email protected]