Please provide us with the following information:
- OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
MacOSX Yosimite v10.10.5- Versions. Please run
ng --version. If there's nothing outputted, please run
in a Terminal:node --versionand paste the result here:
angular-cli: 1.0.0-beta.14
node: 4.5.0
os: darwin x64- Repro steps. Was this an app that wasn't created using the CLI? What change did you
do on your code? etc.
I try to use ng new in any directory on my machine- The log given by the failure. Normally this include a stack trace and some
more information.
"You cannot use the new command inside an angular-cli project."- Mention any other details that might be useful.
I am not inside a project created by the cli. In fact I cant use the command anywhere, in any directory.
Thanks! We'll be in touch soon.
@jgo4th - the ng new command creates a new project which you cannot do within an existing project. You can, however, use the other commands, e.g., ng generate anywhere within an existing project.
The issue tracker is for bugs and feature requests as noted in CONTRIBUTING.md. For better support, consider creating a question on StackOverflow with all the details.
No as in, I cannot use the command ng new in any directory on my device. I am not in any existing projects. What is the cli looking at to determine if its an existing project? Because It believes my Downloads, Documents, and other generic folders, not created by angular-cli, are angular-cli projects. Definitely a blocking issue to even use the CLI.
@jgo4th -- please use StackOverflow for support questions.
@jgo4th your issue might be related with these two:
https://github.com/angular/angular-cli/issues/1079
https://github.com/angular/angular-cli/issues/1045
Do you maybe have a package.json or angular-cli.json somewhere in your home folder? There's probably something up your directory tree that makes the CLI think that it's inside of a project already. The CLI only looks up directories to do this.
I went to my home directory and in my package.json removed all references to angular-cli. I was then able to use ng new. MAC-OSX Sierra
@filipesilva @juliemr Thanks for your answers. I didn't find package.json in my home folder, but in the parent folder. Hopefully, this would help someone else too. :)
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
I went to my home directory and in my package.json removed all references to angular-cli. I was then able to use ng new. MAC-OSX Sierra