Skip to content

New project created in wrong way #4999

Closed

Description

@bay007

I want to create my app called "pr2" (ng new pr2) in the folder c:\Users\DELL\Documents\angular2 the process for creation stars and ends Successfully, but when try to navigate to forder pr2 the folder is missing. image

If run the command ng new pr2 again I get the error Directory 'pr2' already exists.

image

Searching where is my project pr2, I found it in the path "c:\Users\DELL", 2 folders up.


OS?

Microsoft Windows 7 Professional
6.1.7601 Service Pack 1 Compilación 7601

Versions.

@angular/cli: 1.0.0-beta.32.3
node: 7.3.0
os: win32 x64
@angular/common: 2.4.8
@angular/compiler: 2.4.8
@angular/core: 2.4.8
@angular/forms: 2.4.8
@angular/http: 2.4.8
@angular/platform-browser: 2.4.8
@angular/platform-browser-dynamic: 2.4.8
@angular/router: 3.4.8
@angular/cli: 1.0.0-beta.32.3
@angular/compiler-cli: 2.4.8

Mention any other details that might be useful.

I unnistalled angular-cli with the commands
npm uninstall -g angular-cli
npm cache clear

Installed again with the command
npm install -g @angular/cli
the behaviour is the same.

I cut and paste the folder c:\Users\DELL\pr2 to c:\Users\DELL\Documents\angular2\
I am in the path c:\Users\DELL\Documents\angular2\pr2 and ran the command
ng serve --host 0.0.0.0 --port 4201 --live-reload-port 49153
and the app works until now.

image

Activity

  1. filipesilva commented on Feb 26, 2017

    @filipesilva
    Contributor

    That happened because you had a node_modules or package.json up in c:\Users\DELL, which caused the CLI to identify that folder as the project root.

    Dupe of #1079, fixed in #4901, released in rc.0.

  2. angular-automatic-lock-bot commented on Sep 6, 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.

  3. locked and limited conversation to collaborators on Sep 6, 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

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions