Blocked esbuild.exe executable breaks Angular projects
See original GitHub issue🐞 Bug report
The issue originates in esbuild
(see: https://github.com/evanw/esbuild/issues/1561), but since Angular adopted esbuild
as part of build system it stopped companies with strict binary execution policy on Windows to continue updating Angular projects.
Command (mark with an x
)
- new (as it does installation of dependencies, postinstall fails)
- build
- serve
- test
- e2e
- generate
- add
- update
- lint
- extract-i18n
- run
- config
- help
- version
- doc
Is this a regression?
In some scope, yes. Earlier versions of Angular do not use esbuild
and because of that the issue does not exist in Angular workspaces.
Description
On Windows machines with restricted binary execution policy (quite common setup in enterprise companies) execution of esbuild.exe
is being blocked. This results in (1) failed postinstall and (2) failure to build projects.
Postinstall failure:
esbuild
comes as a transitive dependency from Angular:
Build failure (output is full of identical errors):
Executable is blocked:
🔬 Minimal Reproduction
Ideas to reproduce similar behaviour:
- Block execution of
esbuild.exe
on Windows (?) - Corrupt
esbuild.exe
so that it would fail to run mimicking blocked execution
🌍 Your Environment
$ ng version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 12.2.3
Node: 14.17.0
Package Manager: npm 6.14.13
OS: win32 x64
Angular: 12.2.3
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, language-service, material, platform-browser
... platform-browser-dynamic, router, upgrade
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1202.3
@angular-devkit/build-angular 12.2.3
@angular-devkit/core 12.2.3
@angular-devkit/schematics 12.2.3
@angular/flex-layout 12.0.0-beta.34
@angular/localize 12.1.1
@schematics/angular 12.1.4
ng-packagr 12.1.2
rxjs 6.6.7
typescript 4.3.5
Anything else relevant?
Ideas how this issue could be solved:
- Angular could provide an option to fallback to
esbuild-wasm
. Ideally, the fallback should happen only on Windows and other environments could benefit from full potential ofesbuild
. - Support
esbuild
project to code sign executable (More info: https://github.com/evanw/esbuild/issues/1561). Having code signed executable would provide a way for companies to create execution exception rules for all future versions ofesbuild.exe
.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:6 (1 by maintainers)
Top GitHub Comments
As a workaround if you use Yarn, you can use “resolutions”
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.