-
Notifications
You must be signed in to change notification settings - Fork 10
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
typescript 项目中使用报错 #144
Comments
感谢提出 issue并 fix。 |
## [3.5.2](v3.5.1...v3.5.2) (2024-06-10) ### 🐛 Bug 修复 * 修复 typescript 中使用找不到声明文件 ([314c051](314c051)), closes [#144](#144)
🎉 This issue has been resolved in version 3.5.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
typescript 项目里应该 tsconfig.json moduleResolution 不是 node 的话应该都会出现,是 node 的话是可以正常解析到的,Bundler、nodenext 都会报错。 |
了解~ |
今天在使用中发现上次并没有从根源上解决问题,虽然不会报找不到声明文件的错了,但是使用中会提示 [worker reload] [worker init] The requested module 'socks-proxy-agent' does not provide an export named 'SocksProxyAgent'
import { SocksProxyAgent } from 'socks-proxy-agent';
^^^^^^^^^^^^^^^
SyntaxError: The requested module 'socks-proxy-agent' does not provide an export named 'SocksProxyAgent' 测试发现只要更改 proxy agent 的引入方式: import HttpsProxyAgent from 'https-proxy-agent';
import SocksProxyAgent from 'socks-proxy-agent'; 或者删除掉 不太清除这两种解决方案会不会带来新的问题,甚至有点弄不清为啥会出现这么奇怪的问题,所以放上来看看。 |
只需要在 exports 中添加 types 就可以解决这个问题
The text was updated successfully, but these errors were encountered: