Reputation: 9392
Hi I am currently using angular 8 with cli version 8.3.17.
I am trying to create an library inside a libs folder instead of the normal projects folder
I tried running:
ng g lib libs/test**
but I get the error:
Project name "libs/test" is not valid. New project names must start with a letter, and must contain only alphanumeric characters or dashes. When adding a dash the segment after the dash must also start with a letter. libs/test
Upvotes: 2
Views: 1518
Reputation: 21
In your angular.json
, you can change newProjectRoot
from projects
to libs
and create the library by running ng g lib test
- just note that any apps you generate will also have this path.
Alternatively, Nrwl NX
includes cli commands which generates libraries in a /libs
directory by default.
Upvotes: 2