Angular on Deno
Hello everyone! Got a problem with Deno and would like to ask for your advice.
I'm trying to serve a new default angular project but get it being built infinitely.
The command is basically:
Angular CLI: 18.1.0 Node: 20.11.1 Package Manager: npm 9.2.0 OS: linux x64 Angular: 18.1.0 ... animations, cli, common, compiler, compiler-cli, core, forms ... platform-browser, platform-browser-dynamic, router Package Version --------------------------------------------------------- @angular-devkit/architect 0.1801.0 @angular-devkit/build-angular 18.1.0 @angular-devkit/core 18.1.0 @angular-devkit/schematics 18.1.0 @schematics/angular 18.1.0 rxjs 7.8.1 typescript 5.5.3 zone.js 0.14.7 In case it should be reproduced, first i ran
ng serve
which transform under deno into:
deno run --allow-read --allow-env --allow-sys --allow-run --allow-write --allow-ffi --allow-net npm:@angular/cli/ng serve
Angular seems to have been installed correctly, as it returns version info:
deno run --allow-read --allow-env --allow-sys --allow-run npm:@angular/cli/ng version
Angular CLI: 18.1.0 Node: 20.11.1 Package Manager: npm 9.2.0 OS: linux x64 Angular: 18.1.0 ... animations, cli, common, compiler, compiler-cli, core, forms ... platform-browser, platform-browser-dynamic, router Package Version --------------------------------------------------------- @angular-devkit/architect 0.1801.0 @angular-devkit/build-angular 18.1.0 @angular-devkit/core 18.1.0 @angular-devkit/schematics 18.1.0 @schematics/angular 18.1.0 rxjs 7.8.1 typescript 5.5.3 zone.js 0.14.7 In case it should be reproduced, first i ran
deno run --allow-read --allow-env --allow-sys --allow-run --allow-write npm:@angular/cli/ng new ng-hello
Which built just fine and the project created seems OK.
Any feedback is appreciated, feel free to tag me any time on this topic if needed. Hope for your help!1 Reply
I apologize, but I wasn't able to find the answer to your question in the official Deno documentation. However, based on the information you've provided, I can offer some general advice, but please note that this advice is not based on the Deno documentation, and I advise you to double-check the accuracy of the advice given.
From your message, it seems like you are trying to use Angular CLI with Deno, which is not a typical use case since Angular CLI is designed to work with Node.js. Deno has a different set of APIs and does not support the Node.js module system out of the box. Therefore, running Angular CLI directly with Deno might not be straightforward or supported.
The command you're using to serve the Angular project:
This command attempts to use Deno to run an npm package, which is not a typical use case for Deno. Deno does not natively run npm packages as it uses a different module resolution system.
If you are looking to use Angular with Deno, you might need to look for a Deno-specific framework or a way to compile Angular into a format that is compatible with Deno. However, as of my knowledge cutoff date, there is no official support for Angular on Deno.
For now, Angular development is typically done in a Node.js environment, and if you're looking to work with Deno, you might want to explore frameworks that are designed to work with Deno from the ground up.
Again, please verify this information independently, as the Deno ecosystem is evolving, and there may have been developments after my knowledge cutoff date.