前端常见错误

时间:2024-11-03 09:04:03

搭建vue+element-ui脚手架错误

基于vue官方文档和element官方文档搭建手册报错
安装element

Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.
types.js?8ad0:39 Uncaught TypeError: Cannot read property 'prototype' of undefined

可尝试解决办法:

vue与element版本不匹配

npm list vue
npm list element-ui

版本相同,重新安装依赖

rm -rf node_modules
rm package-lock.json
npm install

版本不一致,例如vue降版本

npm uninstall vue
npm install vue@2.6.14

可以尝试清理 npm 缓存

npm cache clean --force