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

Build error after upgrading from 18.0.6 to 18.2.3 #28390

Closed
alextse opened this issue Sep 11, 2024 · 0 comments · Fixed by #28393
Closed

Build error after upgrading from 18.0.6 to 18.2.3 #28390

alextse opened this issue Sep 11, 2024 · 0 comments · Fixed by #28393

Comments

@alextse
Copy link

alextse commented Sep 11, 2024

Which @angular/* package(s) are the source of the bug?

Don't known / other

Is this a regression?

Yes

Description

Getting the following error after upgrading from 18.0.6 to 18.2.3. Not sure whether it's issue from Angular or Azure Storage Blob.

9:00:46 PM [vite] Error when evaluating SSR module /@fs/home/git/app/.angular/cache/18.2.3/vite/deps_ssr/@azure_storage-blob.js?v=e87b4b88:
|- TypeError: Cannot read properties of undefined (reading 'MAX_LENGTH')
    at eval (/home/git/app/.angular/cache/18.2.3/vite/deps_ssr/@azure_storage-blob.js:24853:55)

To Reproduce
Steps to reproduce the behavior:

  1. Setup Angular 18 App with SSR
  2. Install @azure/storage-blob package
  3. import { BlockBlobClient } from '@azure/storage-blob'; in one of the component
  4. Build and run the Angular app.
  5. The last line below is throwing the exception.
// node_modules/@azure/storage-blob/dist-esm/storage-common/src/PooledBuffer.js
var import_buffer = __toESM(require_buffer());
var maxBufferLength = import_buffer.default.constants.MAX_LENGTH;

Expected behavior
No error to occur.

Screenshots
N/A

Additional context
N/A

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

9:00:46 PM [vite] Error when evaluating SSR module /@fs/home/git/app/.angular/cache/18.2.3/vite/deps_ssr/@azure_storage-blob.js?v=e87b4b88:
|- TypeError: Cannot read properties of undefined (reading 'MAX_LENGTH')
    at eval (/home/git/app/.angular/cache/18.2.3/vite/deps_ssr/@azure_storage-blob.js:24853:55)

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 18.2.3
Node: 20.15.0
Package Manager: npm 10.8.3
OS: linux x64

Angular: 18.0.5
... animations, cdk, common, compiler, compiler-cli, core, forms
... material, platform-browser, platform-browser-dynamic
... platform-server, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1802.3
@angular-devkit/build-angular   18.2.3
@angular-devkit/core            18.2.3
@angular-devkit/schematics      18.2.3
@angular/cli                    18.2.3
@angular/ssr                    18.2.3
@schematics/angular             18.2.3
rxjs                            7.8.1
typescript                      5.4.5
zone.js                         0.14.10

Anything else?

No response

@JoostK JoostK transferred this issue from angular/angular Sep 11, 2024
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Sep 11, 2024
…dencies by Vite

This commit excludes Node.js module imports from being processed by Vite when prebundling is enabled.

Closes angular#28390
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Sep 11, 2024
…dencies by Vite

This commit excludes Node.js module imports from being processed by Vite when prebundling is enabled.

Closes angular#28390
alan-agius4 added a commit that referenced this issue Sep 11, 2024
…dencies by Vite

This commit excludes Node.js module imports from being processed by Vite when prebundling is enabled.

Closes #28390
alan-agius4 added a commit that referenced this issue Sep 11, 2024
…dencies by Vite

This commit excludes Node.js module imports from being processed by Vite when prebundling is enabled.

Closes #28390

(cherry picked from commit 4153a6e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant