Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng new my-app causes This command can not be run inside of a CLI project. #10594

Closed
javadev opened this issue May 2, 2018 · 16 comments · Fixed by #10601
Closed

ng new my-app causes This command can not be run inside of a CLI project. #10594

javadev opened this issue May 2, 2018 · 16 comments · Fixed by #10601
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Milestone

Comments

@javadev
Copy link

javadev commented May 2, 2018

Versions

Node v8.11.1
NPM 5.6.0
Windows 10 64 bit

Repro steps

  • install next version of @angular/cli@next
  • Create new project with ng new my_project
  • See error message

Observed behavior

This command can not be run inside of a CLI project.

Desired behavior

New project should be created.

Mention any other details that might be useful (optional)

@javadev javadev changed the title ng new my-app causes This command can not be run inside of a CLI project. ng new my-app causes This command can not be run inside of a CLI project. Windows 10 pro. May 2, 2018
@javadev javadev changed the title ng new my-app causes This command can not be run inside of a CLI project. Windows 10 pro. ng new my-app causes This command can not be run inside of a CLI project. May 2, 2018
@akanass
Copy link

akanass commented May 2, 2018

hy @javadev your issue is duplicate of #10590 I've reported this morning too

@javadev
Copy link
Author

javadev commented May 2, 2018

How it is possible to release a new version of angular-cli and not test new project generation?

Build system should be improved.

@avatsaev
Copy link

avatsaev commented May 2, 2018

Seems to be fixed on master

@EigenTheory
Copy link

Same issue here.

@akanass
Copy link

akanass commented May 2, 2018

delete all .angular* files in the user root directory and all will work after

@EigenTheory
Copy link

Works now, thanks!

@Brocco Brocco self-assigned this May 2, 2018
@Brocco Brocco added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label May 2, 2018
@Brocco Brocco added this to the v6.0.0 milestone May 2, 2018
Brocco added a commit to Brocco/angular-cli that referenced this issue May 2, 2018
Brocco added a commit to Brocco/angular-cli that referenced this issue May 2, 2018
Brocco added a commit to Brocco/angular-cli that referenced this issue May 2, 2018
hansl pushed a commit that referenced this issue May 2, 2018
@KunalOjha
Copy link

KunalOjha commented May 8, 2018

In the folder you are targeting, if there is an angular-cli.json file, remove it. Worked for me.

@pankajparkar
Copy link

Update @angular/cli to latest version 6.0.1 and it started working.

@DorMiX
Copy link

DorMiX commented May 17, 2018

I updated @angular/cli to latest version 6.0.3 and the message occurs again. But deleting all .angular* files the problem is eliminated.

@lksnmnn
Copy link

lksnmnn commented Jun 12, 2018

Maybe we can change the error message to enable users to remove their leftover files without having to google it first...

@tekpartner-new
Copy link

tekpartner-new commented Aug 4, 2018

I'm working on a Mac. I tried looking for the files .angular* on the following directories:

/Users/XXXX

/

I couldn't find the files there. Where else am I supposed to look?

@rhadamez
Copy link

Still happening to me. Have tried to uninstall -g and install the lastest version, but did't work.

Versions

Angular CLI: 6.1.5
Node: 10.0.0
NPM: 6.4.0
Win 10 x64

Where are theses .angular* files?

@daham81
Copy link

daham81 commented Sep 9, 2018

I am having lot of trouble with his error message. No .angular* files located in my home/root directories.

ng n c gives this error

This command can not be run inside of a CLI project.

Angular: 6.1.6
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package Version

@angular-devkit/architect 0.7.5
@angular-devkit/build-angular 0.7.5
@angular-devkit/build-optimizer 0.7.5
@angular-devkit/build-webpack 0.7.5
@angular-devkit/core 0.7.5
@angular-devkit/schematics 0.8.1
@angular/cdk 6.4.7
@angular/cli 6.2.1
@angular/material 6.4.7
@ngtools/webpack 6.1.5
@schematics/angular 0.8.1
@schematics/update 0.8.1
rxjs 6.3.2
typescript 2.7.2
webpack 4.9.2

This is very disheartening.. especially since I am learning angular at the same time.

@arif7503
Copy link

Try to run cmd as Administrator

@ryrobbo
Copy link

ryrobbo commented Sep 26, 2018

I got around this issue by removing a stray angular-cli.json file from the folder path where I was trying to install a new Angular app.

I was attempting to install a new app in the directory: /home/vagrant/projects/angular-app

However, inside the /home/vagrant/projects directory was an angular-cli.json file that I kept for a backup. I renamed the file and put a '1' in front of the file name and was able to install successfully after that.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.