Skip to content

ng new not working #3258

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
eugeniorobles opened this issue Nov 23, 2016 · 6 comments
Closed

ng new not working #3258

eugeniorobles opened this issue Nov 23, 2016 · 6 comments

Comments

@eugeniorobles
Copy link

eugeniorobles commented Nov 23, 2016

Please provide us with the following information:

OS?

Mac OSX Sierra

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:
angular-cli: 1.0.0-beta.21
node: 6.9.1
os: darwin x64

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.
ng new PROJECT_NAME (this command is not working)

The log given by the failure.

Normally this include a stack trace and some more information.

not failure in the logs, it creates the files but when I open the directory its empy, no files inside

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

@deebloo
Copy link
Contributor

deebloo commented Nov 26, 2016

@FructuosoRobles can you elaborate/give the exact steps.

@wanthony
Copy link

@deebloo I've run into this as well when running ng new.

I noticed that instead of creating the app in the current directory, the app is created in my home dir.

My ng --version:

angular-cli: 1.0.0-beta.21
node: 6.3.1
os: darwin x64

@eugeniorobles
Copy link
Author

Hello. the steps are:

1.- make dir in desktop: PROJECT
2.- access PROJECT dir from terminal
3.- ng new PROJECT_ANGULAR
4.- all ok!! but, files are created in home dir (true, I just delete them a few minutes ago).

What can I do?

@wanthony
Copy link

wanthony commented Dec 7, 2016

@deebloo @FructuosoRobles I think I tracked down the problem (for me at least, @FructuosoRobles this may apply to you as well) -- seems I had a package.json in my home dir, and it looks like ng new (well, buried deep in the Project model from ember-cli, which is eventually used by ng new) traverses up the directory tree looking for a package.json. If it's found, it assumes that's the project root, and at some point ng new changes to that directory.

Once I removed the rogue package.json I was able to run ng new projectname and see the generated files in a new directory under my current directory.

@filipesilva
Copy link
Contributor

filipesilva commented Dec 29, 2016

Dupe of #1079. It's the package.json in your home folder.

@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

4 participants