Repository navigation
Closed
Labels
area: @angular-devkit/build-angulardevkit/build-angular:dev-serverfreq1: lowOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix
Description
Command
serve
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
16.0.0
Description
The error comes when we call the loadFormFields method in the project/schema library. This used to work perfectly fine in version 16. The demo project resembles the structure of the real project that we work on, so we cannot make changes to the code structure or remove the function call.
Minimal Reproduction
- run- npm run start
- launch the browser
- open console
minimal reproduction depo project- https://github.com/ivegotwings/angularclibug
Exception or Error
`
chunk-XD6TBTUO.js:12 Uncaught Error: Dynamic require of "google-protobuf" is not supported
at chunk-XD6TBTUO.js:12:9
at projects/schema/src/lib/model/pbjs/extschema/ves.io/schema/errors_pb.js (errors_pb.js:11:12)
at __require2 (chunk-XD6TBTUO.js:21:50)
at index.ts:3:15
`
Your Environment
Angular CLI: 17.0.9
Node: 20.10.0
Package Manager: npm 10.2.3
OS: darwin x64
Angular: 17.0.8
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1700.9
@angular-devkit/build-angular 17.0.9
@angular-devkit/core 17.0.9
@angular-devkit/schematics 17.0.9
@angular/cli 17.0.9
@schematics/angular 17.0.9
rxjs 7.8.1
typescript 5.2.2
zone.js 0.14.2
Anything else relevant?
No response
Reacted by Julian Schlenker, Juraj S. and Ruben Limon
Metadata
Metadata
Assignees
Labels
area: @angular-devkit/build-angulardevkit/build-angular:dev-serverfreq1: lowOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix
Activity
alan-agius4 commentedon Jan 10, 2024
Whlist there is a problem in the dev-server when using
require. It is worth mentioning that dynamic imports that use string literals such asimport('./model/pbjs/extschema/ves.io/schema/${entity}/form-fields.js')will not longer work with the esbuild pipeline.See: evanw/esbuild#56
fix(@angular-devkit/build-angular): correctly add `required` modules …
fix(@angular-devkit/build-angular): add `required` modules as externa…
fix(@angular-devkit/build-angular): add `required` modules as externa…
fix(@angular-devkit/build-angular): add `required` modules as externa…
davide1995 commentedon Feb 24, 2024
Suffering the same problem with Angular 17.1.3:
BastianKamp commentedon Feb 28, 2024
Same error with @angular-devkit/build-angular version 17.2.1
BastianKamp commentedon Feb 28, 2024
@alan-agius4 can you open the issue again? As others have noted, it is not solved. I have tested the behavior with 17.1.4. and 17.2.1.
arobinson commentedon Mar 5, 2024
I'm not sure if this is the same issue, but I'm getting the error while trying get the Angular application to work with our source. The code in question for us, is using a dynamic import to load an Angular module on the fly without using the router:
This is producing the error:
Which is coming from:
I'm not sure if I need to change something in my tsconfig or I'm hitting this bug.
@angular-devkit/build-angular 17.2.0Moccod commentedon Mar 24, 2024
Experiencing same bug in 17.3
Angular CLI: 17.3.0
Node: 20.11.1
Package Manager: npm 10.2.4
OS: win32 x64
Angular: 17.3.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, material, platform-browser, platform-browser-dynamic
... platform-server, router, ssr
Package Version
@angular-devkit/architect 0.1703.0
@angular-devkit/build-angular 17.3.0
@angular-devkit/core 17.3.0
@angular-devkit/schematics 17.3.0
@schematics/angular 17.3.0
rxjs 7.8.1
typescript 5.3.3
zone.js 0.14.4`
angular-automatic-lock-bot commentedon Apr 24, 2024
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.