Error - This command can only be run inside of a CLI project
问题 I am working on an ionic 3 project with the name portal. I need to create a service called user but i keep getting the above error. These are the steps i followed: cd portal npm install -g angular-cli@latest npm install ng g service user Then i get the error This command can only be run inside of a CLI project . I noticed that angular-cli is not getting added to my dependency list in package.json nor do i have the cli directory under @angular in the node modules directory. I tried the install