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

Proposal: Stop ng new going up one directory in search for package.json #4216

Closed
gotofritz opened this issue Jan 25, 2017 · 3 comments
Closed

Comments

@gotofritz
Copy link

Hi. I have also got bitten by #1079 (summary: if you do ng new xxx in an empty folder, and the parent folder has a package.json, the new project will be created in the parent folder).

I fail to see a realistic user case where one may need that. It causes only confusion (if you look at the original bug it has already 5 duplicates, showing that it is a common enough problem). And as far as I can see, new doesn't actually fetch any information from the package.json, so I'm at a loss to explain why it is actually looking for it. I think it all stems from the packageJson var in ng,

const packageJson = require('../package.json');
but I think ng new should disregard it since not relevant in that case.

@gotofritz gotofritz changed the title Proposal: Stop ng new going up directories in search for package.json Proposal: Stop ng new going up one directory in search for package.json Jan 25, 2017
@SanderElias
Copy link

I agree that looking for a package.json does not make sense for ng new. If you have a package.json somewhere up the tree, that does not mean you intend to create the new project there. Usually, you intend to create a new project right where you are.

@filipesilva
Copy link
Contributor

Fixed by #4901

@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 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants