angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

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

Open javadev opened this issue 8 years ago • 16 comments

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 avatar May 02 '18 08:05 javadev

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

akanass avatar May 02 '18 08:05 akanass

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

Build system should be improved.

javadev avatar May 02 '18 08:05 javadev

Seems to be fixed on master

avatsaev avatar May 02 '18 14:05 avatsaev

Same issue here.

EigenTheory avatar May 02 '18 14:05 EigenTheory

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

akanass avatar May 02 '18 15:05 akanass

Works now, thanks!

EigenTheory avatar May 02 '18 17:05 EigenTheory

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

KunalOjha avatar May 08 '18 05:05 KunalOjha

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

pankajparkar avatar May 11 '18 13:05 pankajparkar

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

DorMiX avatar May 17 '18 13:05 DorMiX

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

lksnmnn avatar Jun 12 '18 08:06 lksnmnn

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?

ghost avatar Aug 04 '18 19:08 ghost

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?

rhadamez avatar Aug 25 '18 19:08 rhadamez

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.

daham81 avatar Sep 09 '18 05:09 daham81

Try to run cmd as Administrator

arif7503 avatar Sep 19 '18 17:09 arif7503

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.

ryrobbo avatar Sep 26 '18 09:09 ryrobbo

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.