49

I've created Angular2 project using Angular-cli with the following command:

ng new project-name

but, I don't see .angular-cli.json file in my root folder of the project. The angular-cli version I'm using is 1.0.2. I've created multiple projects with cli in the past and have never encountered this problem. Is it because of the recent update? If yes, where can I find the json file? Or do I need to create it manually?

4
  • what happens if you try to run locate angular-cli.json? Commented May 6, 2017 at 19:32
  • "Don't see" in what sense? What happens when you run ng serve? Commented May 6, 2017 at 19:38
  • @torazaburo ng serve works fine! I'm able to use all the cli commands, but can't locate the angular-cli.json file in the root directory. I did 'locate angular-cli.json' and got the following path: /usr/local/lib/node_modules/@angular/cli/blueprints/ng/files/angular-cli.json Commented May 6, 2017 at 19:48
  • 3
    Files starting with a dot are hidden files on Unix-like systems. execute ls -a in the root folder, and you'll see it. Commented May 6, 2017 at 21:53

6 Answers 6

103

Update: With Angular 6.0.0 the filename is changed from .angular-cli.json to angular.json.

.angular-cli.json is a hidden file since @angular/cli version 1.0.

The file got the prefix . with this version 1.0 , so it is hidden as @JB Nizet commented.

The change is described in the wiki of @angular/cli stories 1.0 update

The location of this file is unchanged.

When you create a new project with @angular/cli 1.0.2, the message

create .angular-cli.json

is displayed.

Sign up to request clarification or add additional context in comments.

3 Comments

But how can I run the project developed in previous versions via latest angular-cli ??
I tried to rename my angular-cli.json with angular.json it didnt work for me.. it is throwing and error in the same package. PS : I have migrated my application from angular 5 to angular 6.. afte Migration i am getting error as "Error: Local workspace file ('angular.json') could not be found"
44

angular-cli.json file has been renamed/replaced to angular.json from version 6.0.

mentioned here

2 Comments

this is important to know for everybody who can not find it! thanks
I tried to rename my angular-cli.json with angular.json it didnt work for me.. it is throwing and error in the same package. PS : I have migrated my application from angular 5 to angular 6.. afte Migration i am getting error as "Error: Local workspace file ('angular.json') could not be found"
2

I also somehow created an angular project that didn't have a .angular-cli/json file, but that otherwise appeared to build and test successfully.

Turns out that I created it by cloning the quickstart from GitHub using the instructions here: https://angular.io/guide/setup

If you install the full CLI, then it will generate projects that contain the missing file. Use npm install -g @angular/cli, per https://angular.io/guide/quickstart

Comments

2

You will not see angular-cli.json instead you see this (with dot at the beginning) .angular-cli.json which is hidden file. On finder MAC OS go to the project root folder and do

command + shift + .

or on eclipse open the project in navigator

Window->Show View->Navigator

and

Eclipse -> Preferences -> Remote Systems -> Files: Check the "Show hidden files" Ok.

That way you could display or hide hidden file like (.git, .gitIgnore)

2 Comments

What is "angular-cli.json is .angular-cli.json" ??
File name is indicated as hidden. Actually i need to update the discription.
1

angular-cli.json has now been changed to angular.json on angular 6

Comments

0

Click on ‘View Menu’ in the Project Explorer view and select ‘Filter(sts) / Customize View(eclipse)’. Uncheck the .*resources filter and you will now be able to see the .angular-cli.json in the project structure.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.