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

UnhandledPromiseRejectionWarning: ReferenceError: Storage is not defined #242

Closed
jeremy0519 opened this issue Mar 22, 2020 · 10 comments
Closed

Comments

@jeremy0519
Copy link

@jeremy0519 jeremy0519 commented Mar 22, 2020

latest version of valine and i install it by npm.
I have already insert the code:
import Valine from 'valine';
window.AV = require('leancloud-storage');

@jeremy0519
Copy link
Author

@jeremy0519 jeremy0519 commented Mar 22, 2020

@xCss

@jeremy0519 jeremy0519 changed the title ReferenceError: Storage is not defined UnhandledPromiseRejectionWarning: ReferenceError: Storage is not defined Mar 22, 2020
@lovepoem
Copy link

@lovepoem lovepoem commented Mar 22, 2020

这个应该是因为用了react的新版本

@xCss
Copy link
Owner

@xCss xCss commented Mar 22, 2020

@jeremy0519 @lovepoem 这个问题应该是Valine最新版中的Bug,我正在排查,将于近期更新。感谢反馈。

@jeremy0519
Copy link
Author

@jeremy0519 jeremy0519 commented Mar 22, 2020

那什么版本不会出现这个问题?

@xCss
Copy link
Owner

@xCss xCss commented Mar 22, 2020

@jeremy0519 请尝试下v1.3.9或者更低版本

@jeremy0519
Copy link
Author

@jeremy0519 jeremy0519 commented Mar 22, 2020

@xCss v1.3.9还是不行

@xCss
Copy link
Owner

@xCss xCss commented Mar 24, 2020

@jeremy0519 请尝试下这个版本

// leancloud-storage 已经打包进了Valine.min.js
import Valine from '/path/Valine.min.js'

使用中有什么问题请随时反馈,感谢~

Valine.min.zip

@jeremy0519
Copy link
Author

@jeremy0519 jeremy0519 commented Mar 25, 2020

@xCss 我没有用window.AV=require('leancloud-storage');,还是不行

@lovepoem
Copy link

@lovepoem lovepoem commented Mar 25, 2020

docsite新版本是不是已经解决了这个问题?

@xCss
Copy link
Owner

@xCss xCss commented Apr 10, 2020

@jeremy0519 请尝试下v1.4.0版本

@xCss xCss closed this as completed Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants