Skip to content

New project created in wrong way #4999

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

Closed
bay007 opened this issue Feb 25, 2017 · 2 comments
Closed

New project created in wrong way #4999

bay007 opened this issue Feb 25, 2017 · 2 comments

Comments

@bay007
Copy link

bay007 commented Feb 25, 2017

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

@filipesilva
Copy link
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.

@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 6, 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

2 participants