-
Notifications
You must be signed in to change notification settings - Fork 12k
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
mistakenly thinks it's in a project
#4762
Comments
Happy to look at implementation if we agree we want to make that change, which is detecting project presence based on config file |
You have an Most of the time those are in your HOME folder. |
@hansl did you check the repro steps? |
@hansl I double checked - I don't. But anyway, are you suggesting that the mentioned steps above are not supposed to bring the mentioned message? |
OH okay. No I didn't. I just see those and copy-paste the message lol |
The Angular CLI does use node_modules to detect if it's in a project. This is by design and unlikely to change (it's Ember-CLI specific logic). |
I can see the check is made here https://github.com/angular/angular-cli/blob/master/packages/%40angular/cli/ember-cli/lib/models/project.js#L117 It's part of the Angular CLI project, and we modified the file a few times already. If we agree on the principle that the check should be based on presence of Angular CLI config file, that'd be awesome. We have diverged from the ember CLI anyway (Ember still has an |
Thanks a lot @hansl and @filipesilva 💯 |
I'm using the v.1.0.0-rc1 and still having the same issue. In order to initialize a project with local cli by I still get: "You cannot use the new command inside an Angular CLI project." There are tons of practical reasons why this approach is for us better than having cli globally installed |
@machucarro I just tried this myself and it works. See below for a log of what I did. Maybe you have a CLI config file somewhere up in the directory tree?
|
Unless the directory is already under an Angular CLI project. Fixes angular#4762 Close angular#4901
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
OS?
Windows 8.1
Versions.
Repro steps.
The log given by the failure.
Mention any other details that might be useful.
@angular/cli
undernode_modules
.angular-cli.json
insteadng init
/ng update
is now gone. It allows me to use the CLI without global installation, earlier I usedng init
for thisnew
act asinit
. The scenario I'm asking to support is when the package exists, but no other files likepackage.json
or.angular-cli.json
are present, that is, no Angular CLI project in the folderThe text was updated successfully, but these errors were encountered: