How to create an extension in ACA 4.1

cancel
Showing results for 
Search instead for 
Did you mean: 
Gustavo_DiasRT
Member II

How to create an extension in ACA 4.1

Hello everyone, I'm trying to create an extension in aca, but it gives an error, "Error: This command is not available when running Angular CLI outside a workspace.", I'm running with Nx too, but it doesn't work. Could someone help me by explaining how it is currently working?

2 Replies
Gustavo_DiasRT
Member II

Re: How to create an extension in ACA 4.1

Good morning, I managed to create the extension, but the documentation is a little outdated compared to the current version of the ACA project.

change 1 :

ng is no longer used, that is, we will have to use nx, so angular.json will no longer exist, but project.json, located in app/src/project.json

change 2: 

as ng is no longer used, obviously all ng commands will not work, that is, we will have to use Nx instead, for example to create the library. we would use the nx generate library library_name.

malekgn
Active Member II

Re: How to create an extension in ACA 4.1

Hello,

thanks for sharing Smiley Happy

When I created a library with @nrwl/angular:library generator, I got a problem of changing the version of typeScript 

Here the error message appearing while starting the application:

Error: Failed to initialize Angular compilation - The Angular Compiler requires TypeScript >=4.6.2 and <4.8.0 but 4.9.5 was found instead.

I modified the version manually in package.json file, but the error persist.