Angular CLI: 6.0.0-rc.9
Node: 10.0.0
OS: darwin x64
@angular/cling new my_project$ cd Programmation/Angular/
$ ng new my_project
This command can not be run inside of a CLI project.
Can create and generate new project with command-line
Folder where I want to create the new project isn't an Angular project, only my root folder of all my Angular projects.
All is working fine with @angular/[email protected] and fails with others next versions rc.7, rc.8 and rc.9
+1
Same here
CLI 6 RC9
OS Ubuntu 16
Node 8&9
npm 5&6
@njl07 Do you have a .angular.json file in your users home dir? At some point it looks like this global config file was renamed .angular-config.json and having the old .angular.json present above the directory you're trying to create makes the CLI think you're already inside an angular project.
@Zyzle thanks a lot it was the case. When I deleted those files all is working now.
Cool, I was running this command inside a folder name test on Desktop. However I kept a file name .angular.json as backup on Desktop. So it was creating problem. I simply deleted that file and now it is working perfect.
I had to delete all the .angular* file from my home directory on Windows 10. Post this, installed latest cli using npm install --save-dev @angular/cli@latest . This did the trick, and my ng new is working now.
When I delete the angular file I receive this error:
_Local workspace file ('angular.json') could not be found.
Error: Local workspace file ('angular.json') could not be found._
ng-serve still not working
deleted the .angular.json file in the directory like @Zyzle mentioned allowed ng new to work for me
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
@njl07 Do you have a
.angular.jsonfile in your users home dir? At some point it looks like this global config file was renamed.angular-config.jsonand having the old.angular.jsonpresent above the directory you're trying to create makes the CLI think you're already inside an angular project.