Vite生成的Typescript+Vue项目在使用nodejs里的mysql2在这个包时出现的问题:
safer js Cannot read properties of undefined (reading 'prototype')

根据我摸索,我发现 buffer.Buffer 是undefined

运行一下命令解决
npm i buffer
Vite生成的Typescript+Vue项目在使用nodejs里的mysql2在这个包时出现的问题:
safer js Cannot read properties of undefined (reading 'prototype')
根据我摸索,我发现 buffer.Buffer 是undefined
运行一下命令解决
npm i buffer