question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ng new creates project in home directory instead of the current directory

See original GitHub issue

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Linux Mint 17.3 (based on Ubuntu 14.04)

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.26 node: 7.0.0 os: linux x64

Repro steps.

Was this an app that wasn’t created using the CLI? What change did you do on your code? etc.

cd ~/some/subdirectory/of/home ng new testproject

The log given by the failure.

Normally this include a stack trace and some more information.

No error messages. The CLI prints Project 'testproject' successfully created.

Mention any other details that might be useful.

Expected behavior: The project is created in a subdirectory of the current directory, for instance ~/some/subdirectory/of/home/testproject.

Actual behavior: The project is created directly in the home directory under ~/testproject. The current directory is empty.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
filipesilvacommented, Jan 24, 2017

@lestard you should also have a rogue package.json in your home directory. Deleting that should fully take care of the problem.

0reactions
angular-automatic-lock-bot[bot]commented, Sep 6, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ng new - Angular
Option Description Value Type Default Value ‑‑commit Initial git repository commit information. boolean true ‑‑directory The directory name to create the workspace in. string ‑‑force Force...
Read more >
Creating new angular project in specified location
First go to E drive then change the folder (cd Angular4) then run ng new myapp. EDIT: Or you can concatenate the commands...
Read more >
New Angular Project in Current Directory
One of my projects required a new Angular 6 project folder. I needed to scaffold the Angular 6 contents in an existing directory....
Read more >
Creating Angular Projects With Angular CLI - Medium
That's the default usage of the command and creating a new project folder with [name]. The project which is created in that folder...
Read more >
ng: command not found (Angular) error [Solved] | bobbyhadz
You can link your project to the globally installed Angular package by opening your terminal in your project's root directory (where your package.json...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found