You cannot use the new command inside an angular-cli project.
Installed latest version of angular-cli on my windows pc trying just to create new project with:
ng new project_name
getting error: You cannot use the new command inside an angular-cli project.
Tried to remove , reinstall with npm cache clean, nothing helps :(
OS?
Windows 10 x64.
Versions.
angular-cli: 1.0.0-beta.17 node: 6.4.0 os: win32 x64
Repro steps.
ng new project_name
The log given by the failure.
Normally this include a stack trace and some more information.
Is there a file called angular-cli.json on your desktop?
No, there is no angular-cli.json on my desktop
What if you try to run this command in another folder?
Is there a file called package.json alone in other places ?
Deletes it , maybe solve the problem.

Somewhere in the folders above your current one there is either a node_modules/ folder or a angular-cli.json. Basically the command is detecting that you are already a npm project.
Try checking these folders for node_modules/orangular-cli.json` and delete it:
C:\
C:\Users\
C:\Users\Admin-PC\
C:\Users\Admin-PC\Desktop\
Alternatively, make your project in another folder e.g. C:\test\.
after I delete an exist package.sjon it work for me 10x 👍
If you are using linux, go to home and find package.json and remove that. Keep rocking :+1:
on macOs I did what @nikhilknoldus said about removing the package.json in the home directory it worked for me.
worked for me after deleting package.json file
Faced same issue but didn't work for me if I deleted Package.json from home directory
I have the same issue. I am on a different drive. it's one folder removed from the root. There is no package.json in the root. There is no node_module in the root. I am using windows 10, node 7.4.0, @angular/cli 1.2.0
Any ideas or reasons why? This is becoming such a pain.
Yup. Me, too. Empty directory.
To above: If you are using windows 10, do a global search for package.json to see if you have it in your destination folder's parent folder. I found mine in c:\user\myname and once I removed it everything works fine.
It's basing its decision on whether you have "@angular/cli": "^1.3.1" as a dependency in your package file. This is usually because you're creating an angular project inside another project that may or may not be angular.
If you get the warning:
Unable to find "@angular/cli" in devDependencies.
Please take the following steps to avoid issues:
"npm install --save-dev @angular/cli@latest"
don't do what it says. It'll be part of the package.json when you ng new ....
Guys I have a similar problem I have created a complete new folder included my package.json and node_modules from npm and when I tried to create client folder using ng new client, the error was you cant new command inside Angular CLI project (This was in my D Drive) Then I changed my project drive to C: and copied and pasted all the files except package.json and tried ng new client it worked and client folder is created. But when I tried to start the server using npm start, another error saying package.json file is missing??
Any solution for this confusion? Thanks.
In Mac, press Shift+Command+H or select Finder then press Go option on top toolbar and finally select Home option. Now select package.json,package-lock.json file and delete both the files.
Restart your terminal and you are ready to go.
If you are using Linux, go to home and find package.Json and remove that.
I was trying to install angular as the front-end, for my existing back-end project. E.g. my-project/angular-app.
Was getting what @bluebaroncanada mentioned.
What worked was ng new outside my existing project.
You must initialize npm before creating new angular project, i have the same problem but when i try to init npm, it works
I was facing same problem. I deleted package.json from project and applied necessary command, It worked.