-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
安装的 serialport 模块在打包之后生成的 exe 文件报错,找不到模块 #9
Comments
我是 MacOS 没有出现这个问题,建议按顺序重试:
如果还有问题的话,等我有windows系统我再看一下~ |
我把node_modules/ffi-napi添加到build.files中起效果了,但是遇到cannot find module lodash.defaults的时候这个方法就无效了。大佬有点什么思路码 |
猜测哈,应该是你ffi-napi里面需要用到lodash的模块,你试试把node_modules目录都打进build.files去... |
你这个报错是 require 在 vite 下打包并没有被解析,两个办法可以解决;
|
试试这个模板 |
npm run dev 可以正常运行,并调用这个模块的功能, npm run build 后生成的 .exe 文件会出现如下情况
The text was updated successfully, but these errors were encountered: