You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
App created by ng new is created in wrong place #1079
Tried to use ng new project-name. The project get's created, but the path is wrong. My source code is located in a my /src/apinnecke directory. When I execute the ng new project-name inside of /src/apinnecke the project get's created at /src/project-name. Steps to reproduce are as follows:
$ mkdir -p /src/apinnecke
$ cd /src/apinnecke/
$ ng new project-name
$ ls -a
. ..
$ ls -a ..
. .. project-name
Am i missing a configuration step or am I having a strange setup here? Totally confused. Took me about 10 minutes to find out where the project got created.
Host machine is an OSX El Capitan:
[apinnecke:~] 4s $ uname -a
Darwin minas-tirith 15.5.0 Darwin Kernel Version 15.5.0: Tue Apr 19 18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64
[apinnecke:~] $ ng --version
Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
angular-cli: 1.0.0-beta.5
node: 5.11.1
os: darwin x64
[apinnecke:~] $
Can you post an ls -a of your /src directory? I know I have this problem with some yeoman generators which will create things in the wrong directory based on some hidden files ,so maybe that's what's going on there?
OH! Got it. try to add a package.json in /src/package.json, that will reproduce the issue. Removed that one after testing the project-name stuff because it was a backup of something older, so I abandoned it.
Can you please check now if you're able to reproduce?
Same to me, Ubuntu 16.10, Nodejs v6.10.1, npm 4.2.0 when i make "ng new Project-name" the folder is created in the root directory rather in the directory i am in. #5483
angular-automatic-lock-bot commented on Sep 6, 2019
Activity
Trendy commentedon Jun 14, 2016
I'm unable to reproduce this on OS X Yosemite (10.10.5), following the same steps.
Christopotamus commentedon Jun 16, 2016
Can you post an ls -a of your /src directory? I know I have this problem with some yeoman generators which will create things in the wrong directory based on some hidden files ,so maybe that's what's going on there?
aklinkert commentedon Jun 16, 2016
@Christopotamus sure thing.
Removed some of the source directories since it's internal stuff, but that's basically it.
aklinkert commentedon Jun 16, 2016
OH! Got it. try to add a
package.jsonin/src/package.json, that will reproduce the issue. Removed that one after testing the project-name stuff because it was a backup of something older, so I abandoned it.Can you please check now if you're able to reproduce?
filipesilva commentedon Jun 18, 2016
Possibly related: #1045
adamduren commentedon Jun 22, 2016
I can reproduce the issue with @apinnecke method. Removing the package.json in my home folder resolves the issue.
hansl commentedon Dec 5, 2016
Closing this as
package.jsonindicates where the project is.filipesilva commentedon Feb 26, 2017
This issue shouldn't happen anymore even with
package.jsonin parent directories, due to the fix in #4901.alexispolak commentedon Mar 29, 2017
Same to me, Ubuntu 16.10, Nodejs v6.10.1, npm 4.2.0 when i make "ng new Project-name" the folder is created in the root directory rather in the directory i am in. #5483
angular-automatic-lock-bot commentedon 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.