Skip to content

In mac, ng new project-name creates project in root directory rather in the directory I am in. #5483

Closed

Description

@aniruddhadas9

Bug Report or Feature Request (mark with an x)

  • bug report -> please search issues before submitting
  • feature request

Versions.

@angular/cli: 1.0.0-rc.2
node: 6.9.1
os: darwin x64

Repro steps.

I am in /xyx/abc folder and run ng new appname, cli should create a folder named /xyz/abc/appname and put all the code in ther but it created a folder in root directory and put all code there

  • below are the command I ran*
CDE34RDHGY23FFG:ng2cli user23$ pwd
/Users/user23/aniruddh/develop/ng2cli
CDE34RDHGY23FFG:ng2cli user23$ ng new mar18 --ng4 --style scss --routing true
installing ng
create .editorconfig
...

CDE34RDHGY23FFG:ng2cli user23$ pwd
/Users/user23/aniruddh/develop/ng2cli
CDE34RDHGY23FFG:ng2cli user23$ ls
feb19                   feb24                   feb25                   feb26                   feb3                    jan30                   mar3ng4withrouter       mar7
CDE34RDHGY23FFG:ng2cli user23$
02NM7DYG3QD:ng2cli user23$ pwd
/Users/user23/aniruddh/develop/ng2cli
CDE34RDHGY23FFG:ng2cli user23$ ls
feb19                   feb24                   feb25                   feb26                   feb3                    jan30                   mar3ng4withrouter       mar7
CDE34RDHGY23FFG:ng2cli user23$ cd ../..
CDE34RDHGY23FFG:aniruddh user23$ ls
backup                  gitexp                  installed-software      mar18                   package.json            run.sh                  test
develop                 helpers                 mar17                   npm-debug.log           run.bat                 sauce-config
CDE34RDHGY23FFG:aniruddh user23$

The log given by the failure.

It did not failed but the folder is created in different folder expected

Desired functionality.

The new project folder should created in the same folder

Mention any other details that might be useful.

Activity

  1. changed the title [-]In mac ng new project name create project in root directory rather in the directory I am in.[/-] [+]In mac, `ng new project-name` creates project in root directory rather in the directory I am in.[/+] on Mar 17, 2017
  2. filipesilva commented on Mar 18, 2017

    @filipesilva
    Contributor

    Dupe of #1079, that should have been fixed by #4901.

    @aniruddhadas9 are you absolutely sure you're using a globally installed rc.2? Can you reinstall to make sure?

  3. aniruddhadas9 commented on Mar 18, 2017

    @aniruddhadas9
    ContributorAuthor

    @filipesilva Yes. I tried with both @angular/cli rc.1 and rc.2 and both have same result. I posted command here.

  4. filipesilva commented on Mar 18, 2017

    @filipesilva
    Contributor

    Ok, then please check the solutions in #1079 (checking your root dir for a node_modules or package.json and removing them). Those should help.

  5. aniruddhadas9 commented on Mar 18, 2017

    @aniruddhadas9
    ContributorAuthor

    Sure, Let me check that.

  6. aniruddhadas9 commented on Mar 21, 2017

    @aniruddhadas9
    ContributorAuthor

    removing package.json file from the root folder worked for me. would I close this issue or there is a permanent fix coming?

  7. filipesilva commented on Mar 24, 2017

    @filipesilva
    Contributor

    Let's keep it open. This should have been fixed but it seems the fix might not work.

  8. saviocamacam commented on Jan 28, 2018

    @saviocamacam

    On windows, the same thing happens.

  9. mgechev commented on Dec 17, 2018

    @mgechev
    Member

    @aniruddhadas9 are you still able to reproduce with the latest Angular CLI?

  10. mgechev commented on Dec 21, 2018

    @mgechev
    Member

    Closing the issue due to inactivity. If the problem still exists in the latest version of the CLI, please open a new issue following the template and providing a minimal demo where we can reproduce it. Thanks! :-)

  11. angular-automatic-lock-bot commented on Sep 9, 2019

    @angular-automatic-lock-bot

    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.

  12. locked and limited conversation to collaborators on Sep 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions