报错解决

npm --save install mysql连接mysql报错:code: 'ER_NOT_SUPPORTED_AUTH_MODE'

因为从 MySQL 8.0.4 开始,MySQL 默认身份验证插件从 mysql_native_password 改为 caching_sha2_password 所导致,改回mysql_native_password验证方式即可

mysql -u root -p密码

//更改用户的身份验证插件:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '密码';

//刷新权限:
FLUSH PRIVILEGES;

 

 

使用require报错:

nodeIntegration: true,
contextIsolation: false

<meta http-equiv="Content-Security-Policy" content="default-src; style-src 'self' 'unsafe-inline'; media-src *;connect-src *;script-src * 'unsafe-inline' 'unsafe-eval';">

 

 

 

const electron = require('electron')之后使用里面呢的东西报错:Uncaught TypeError: Cannot read property 'dialog' of undefined

 

posted @ 2021-09-02 10:27  封兴旺  阅读(414)  评论(0编辑  收藏  举报

联系方式: 18274305123(微信同号)