-
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
BlobServiceClient.js depends on '@opentelemetry/types'. CommonJS or AMD dependencies can cause optimization bailouts. #11550
Comments
Related to https://angular.io/guide/build#configuring-commonjs-dependencies. Looks like we could add esm output for core-paging like we did for most of our libraries. |
I'm confused, is this related to |
The original issue looks like a duplicate of open-telemetry/opentelemetry-js#1253 |
I guess those two are causing warnings when using storage libraries. For core-paging, something like #11563 should work? |
Ah, I somehow missed the middle error. Yes, it seems like we can resolve the |
Should we log an upstream issue for uuid like the one logged for open telemetry? |
lol, I somehow managed to miss the uuid warning. yes it supports esm. I wonder whether it's our usage pattern though. we are not importing the default, but v4 from uuid.
|
They already support it: https://github.com/uuidjs/uuid/blob/ac1b3afbf410e2dab259a1b7df0f27da919aabff/package.json#L32 They even support the fancy version: https://github.com/uuidjs/uuid/blob/ac1b3afbf410e2dab259a1b7df0f27da919aabff/package.json#L24 I think we might need to update to latest since the version we're on has a slightly different setup: https://unpkg.com/[email protected]/package.json Notably, it's missing the module version in the fancy form, which might be the problem? @jeremymeng - I believe importing v4 is fine since we're not doing a deep import, it's no different than importing * as uuid and then writing |
Right I do not see the uuid warning in my testing today, likely 8.3.0 is pulled down. |
I am experiencing the same issue with the package Warning: [...]\node_modules@azure\storage-file-datalake\dist-esm\storage-file-datalake\src\DataLakeServiceClient.js depends on '@opentelemetry/api'. CommonJS or AMD dependencies can cause optimization bailouts. Could it be some peer dependency I need to install? I am only making use of |
@bgcc93 |
Looks that the linked opentelemetry issue has been fixed. We should check back after upgrading to the version that contains the fix. |
Upstream issues have been fixed and updates have been released @maorleger Lets make sure we get on the latest 0.20.0 of |
To repro this I created a new angular app and added otel-angular-test master % npm i @azure/core-tracing
+ @azure/[email protected]
added 1 package, removed 29 packages, updated 5 packages and audited 1323 packages in 5.51s
otel-angular-test master % npm run build
> [email protected] build /home/mleger/workspace/otel-angular-test
> ng build
✔ Browser application bundle generation complete.
✔ Copying assets complete.
✔ Index html generation complete.
Initial Chunk Files | Names | Size
main.0d526b4ed5d927c5864b.js | main | 134.38 kB
polyfills.5bfcb9c68535336c5861.js | polyfills | 35.98 kB
runtime.f1870f2033cec01c3be2.js | runtime | 1.02 kB
styles.31d6cfe0d16ae931b73c.css | styles | 0 bytes
| Initial Total | 171.38 kB
Build at: 2021-06-25T16:57:16.010Z - Hash: 283ddf7a8e31ee73abe1 - Time: 9917ms
Warning: /home/mleger/workspace/otel-angular-test/node_modules/@azure/core-tracing/dist-esm/src/interfaces.js depends on '@opentelemetry/api'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies Then I switched to our nightly version which contains the latest otel-angular-test master % npm i @azure/core-tracing@dev
+ @azure/[email protected]
removed 2 packages, updated 2 packages and audited 1322 packages in 5.246s
otel-angular-test master % npm run build
> [email protected] build /home/mleger/workspace/otel-angular-test
> ng build
✔ Browser application bundle generation complete.
✔ Copying assets complete.
✔ Index html generation complete.
Initial Chunk Files | Names | Size
main.458876f477f5e827becc.js | main | 134.16 kB
polyfills.5bfcb9c68535336c5861.js | polyfills | 35.98 kB
runtime.f1870f2033cec01c3be2.js | runtime | 1.02 kB
styles.31d6cfe0d16ae931b73c.css | styles | 0 bytes
| Initial Total | 171.15 kB
Build at: 2021-06-25T16:57:44.822Z - Hash: c40ebc49b590b9aa0885 - Time: 9662ms
otel-angular-test master %
Finally (and I will spare you the output) I packed and installed |
@blrchen a nightly release of @azure/storage-blob has been released and I was wondering if you could help us out by trying it and seeing if the issue is resolved? If you can give it a shot, the version you want to install is:
Feel free to let me know if the issue still persists - I tried it now and did not see the warning. Thanks! |
@maorleger it actually did resolve the issue. (installing version 12.7.0-alpha.20210707.1) |
@maorleger thanks for letting me know, new version is working for me. |
Thanks folks! I will close this issue now that it's confirmed, and this fix will be released when @azure/storage-blob 12.7.0 is released. |
Describe the bug
I am using @azure/storage-blob in my angular app for blob upload operations. Recently I upgraded my project to angular 10 from 9, and start seeing following warnings in npm run build command output.
WARNING in C:\vso\AzureSpeed\src\AzureSpeed.WebApp\ClientApp\node_modules@azure\storage-blob\dist-esm\src\BlobServiceClient.js depends on '@opentelemetry/types'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
WARNING in C:\vso\AzureSpeed\src\AzureSpeed.WebApp\ClientApp\node_modules@azure\storage-blob\dist-esm\src\BlobServiceClient.js depends on '@azure/core-paging'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
WARNING in C:\vso\AzureSpeed\src\AzureSpeed.WebApp\ClientApp\node_modules@azure\core-http\es\src\util\utils.js depends on 'uuid/v4'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No such build warnings
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: