Skip to content
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

window is not defined in webworker #1253

Open
Nio1023 opened this issue Sep 14, 2023 · 4 comments
Open

window is not defined in webworker #1253

Nio1023 opened this issue Sep 14, 2023 · 4 comments

Comments

@Nio1023
Copy link

Nio1023 commented Sep 14, 2023

当我在web worker中使用时,
提示“Uncaught ReferenceError: window is not defined at node_modules/ali-oss/dist/aliyun-oss-sdk.js”
是SDK还未支持web worker吗?

@YunZZY
Copy link
Collaborator

YunZZY commented Oct 18, 2023

是的,还不支持

@nxiang
Copy link

nxiang commented Nov 13, 2023

v6.17.1,该版本支持在web worker中使用

@rowthan
Copy link

rowthan commented Apr 11, 2024

v6.17.1,该版本支持在web worker中使用

请问怎么使用呢 尝试了这个版本以及最新版 6.20.0 都还是引用了window 对象 导致无法使用

@rowthan
Copy link

rowthan commented Apr 12, 2024

v6.17.1,该版本支持在web worker中使用

请问怎么使用呢 尝试了这个版本以及最新版 6.20.0 都还是引用了window 对象 导致无法使用

找到问题了初始化需要加一个参数 usefetch:true 但是对应的ts 没有这个声明..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants