electron-vue脚手架搭建的项目,运行后报错:Object.fromEntries is not a function

electron-vue脚手架搭建的项目,运行后报错:Object.fromEntries is not a function

项目目录
electron-vue脚手架搭建的项目,运行后报错:Object.fromEntries is not a function_第1张图片

前端控制台打印错误:
electron-vue脚手架搭建的项目,运行后报错:Object.fromEntries is not a function_第2张图片

解决办法:安装polyfill-object.fromentries,在项目根目录执行命令

npm i polyfill-object.fromentries

然后再打开.electron-vue\dev-client.js引入

import 'polyfill-object.fromentries';

electron-vue脚手架搭建的项目,运行后报错:Object.fromEntries is not a function_第3张图片

重新启动

electron-vue脚手架搭建的项目,运行后报错:Object.fromEntries is not a function_第4张图片

你可能感兴趣的:(【,web前端,】,【,踩过的坑,】,vue.js,electron,javascript)