can't create library in sub scope

360 views Asked by At

I seem to have a problem with my @nrwl/cli/nx installation in my angular project. I can not create libraries in "sub scopes" anymore.

nx g lib bla/foo-bar

Project name "bla/foo-bar" 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.

If i create a library with simple dashes, this works.

nx g lib bla-foo-bar
CREATE bla-foo-bar/README.md (1026 bytes)
CREATE bla-foo-bar/karma.conf.js (1024 bytes)
CREATE bla-foo-bar/ng-package.json (154 bytes)

Also, if i use the exact schematics it works as well:

nx g @nrwl/angular:library bla/foo-bar
CREATE bla/foo-bar/README.md (1026 bytes)
CREATE bla/foo-bar/karma.conf.js (1024 bytes)
CREATE bla/foo-bar/ng-package.json (154 bytes)

I did create libraries just as above with the nx command in the past. We use this in our project to organize libraries into scopes and sub scopes.

I can not find anything on this subject. My co-worker, using the same code-base and the same comand to create a library does not have this problem. So it must be related to my locally installed @nrwl/cli i assume.

I did try to upgrade nrwl/cli (sudo npm i -g @nrwl/cli) but that didn't make any difference.

There is a similar question on stackoverflow but with less detail and not explaining that the command itself should work.

0

There are 0 answers