-
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
Feature request: Initialize a new CLI project without having CLI globally installed #4768
Comments
Related #4762 I think if we fix it, this one will be fixed as well. |
@Meligy, comment that saying it is not quite 'by design' #4762 (comment) :
|
|
@filipesilva this is more related to #4762, which is also closed, but has a pending discussion that I hope you or @hansl can look at, so, it's either completely killed, or maybe opened for further consideration. It also makes implementing your suggestion here 3ad2856#commitcomment-20929880 a bit easier. |
@filipesilva I saw the PR you mentioned, that is why I raised the Feature request, why you do not want to keep for further discussion? |
Hi everyone, Dennis from the WebStorm team. |
@denofevil the problem for us is that we don't want to support the command at all. It's not as much a matter of technical feasibility but rather a question of the set of commands we want to have in the CLI. @Meligy did you have time to look at the bug we discussed? |
@filipesilva so how about handling non-empty directory in |
That is @Meligy's suggestion in #4762. Maybe you can even use it in your scenario right now with no change: Currently @Meligy's full scenario (using a local CLI install) doesn't work because the CLI uses package.json/node_modules as project identity, and thus it considers to already be inside of a project. We were looking at fixing a related bug (#1079) that would enable #4762. |
@filipesilva actually that was the second thing I've tried and I'm getting
which seems to be handled here. This exception is causing then block in new command to be never invoked. |
Ok, that's a bit more problematic. Maybe we need a force flag or something. |
Yes, that would work ok for us. |
Sorry about the lack of discussion on this, I've been away all weekend. I think Filipe has done a good job explaining why we removed
|
Dupe of #4762. Will use that one to track. Thanks! |
Reason
Due to major breaking changes with each CLI release to be able to initialize a new project without having CLI globally installed so this way we can run multiple projects with different CLI versions on single PC and it is what was the purpose of this PR 761e86f
Current situation
Before beta30 without having CLI globally installed it was possible to create CLI app just like that :
npm init -y
npm install @angular/cli --save
package.json
by adding"ng":"ng"
script section (761e86f)npm run ng -- init
Now it is seams to be it is not longer possible due to this PR #4628
Proposal
How about if you run
npm run ng -- new
on an empty folder it will create the new CLI app?Right now it is also not an option because just by having a folder with just
node_modules
folder and a simplepackage.json
like that:When running
npm run ng -- new
I am getting an errorYou cannot use the new command inside an Angular CLI project.
which is not quite right because there is no Angular CLI app in my folder.The text was updated successfully, but these errors were encountered: