-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[storage-blob 12 preview] Error using BlobServiceClient on production app #4890
Comments
Hi @ljgago thanks for using the preview libraries and reporting this issue. We will take a look at this! |
Seems to be something with webpack, we are facing the same error right now. Excluding this module (and all of its dependencies) from webpack fixes the problem... But that's a bad option. Please investigate |
@ljgago Will v10 @azure/storage-blob package has this issue? |
@XiaoningLiu the @azure/storage-blob V10 has not this issue. |
This may be related the circular references we have between the clients. It looks like the react app tries to load |
I could repro the issue with both 12.0.0 preview 2 and preview 3 but not with V10. @jeremymeng, Tried reordering the exports in the index file similar to that of V10 and generated the storage-blob package tar zip. Didn't seem to have any effect, the error still persists. |
Simplified webpack repro: https://github.com/jeremymeng/webpacktest |
also happens in ts-node. what I tried doing was appending '/dist' to import and override esm.
it breaks since in the /dist file of preview - it also imports the es module. In addition, in TS if you import the library to react, it also uses the esm and breaks when it tries importing 'fs'. |
@mrsufgi, Thanks for the comment. We are still fixing the issue with webpack at our end(probably, caused by the circular references between the clients). From your comment #4890 (comment), It looks like you tried modifying the entry points and lost the links to core-http. |
Yeah I figured, I ended up reverting to the current stable api:) |
Thanks for working with Microsoft on GitHub! Tell us how you feel about your experience using the reactions on this comment. |
The next update of the storage blob library will have the fix to this issue |
Describe the bug
I am working with react and azure storage blob.
On build the project for production with
yarn build
and running this with a server, it show the next error:This error ever show if you use BlobServiceClient() function and with this error you can't see the my react app.
If you run in dev mode with ´yarn start´ this error does not appear.
To Reproduce
Steps to reproduce the behavior:
yarn build
yarn start
this error does not show)The text was updated successfully, but these errors were encountered: