Skip to content
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

Can't generate components in same folder. #2136

Closed
gbrigens opened this issue Sep 15, 2016 · 5 comments
Closed

Can't generate components in same folder. #2136

gbrigens opened this issue Sep 15, 2016 · 5 comments
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent type: bug/fix

Comments

@gbrigens
Copy link

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
    Mac OSX El Capitan
  2. 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.11-webpack.2
    node: 6.3.1
    os: darwin x64
  3. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.
    App was created using CLI
  4. The log given by the failure. Normally this include a stack trace and some
    more information.
    It doesn't give an error but the files are generated in the wrong path. This is a link to stack overflow with an screenshot of the same http://stackoverflow.com/questions/39478893/angular-cli-creating-files-in-the-same-folder-error.

Thanks! We'll be in touch soon.

@filipesilva
Copy link
Contributor

@Brocco can you have a look? Relative path generation seems broken, I tried it just now and stuff should have been created in src/app/test/new-cmp/ instead of src/app/new-cmp/ I believe.

kamik@T460p MINGW64 /D/sandbox/beta15-project (master)
$ ng g c test
installing component
  create src\app\test\test.component.css
  create src\app\test\test.component.html
  create src\app\test\test.component.spec.ts
  create src\app\test\test.component.ts

kamik@T460p MINGW64 /D/sandbox/beta15-project (master)
$ cd src/app/test/

kamik@T460p MINGW64 /D/sandbox/beta15-project/src/app/test (master)
$ ng g c new-cmp
installing component
  create src\app\new-cmp\new-cmp.component.css
  create src\app\new-cmp\new-cmp.component.html
  create src\app\new-cmp\new-cmp.component.spec.ts
  create src\app\new-cmp\new-cmp.component.ts

@filipesilva filipesilva added type: bug/fix command: generate P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent labels Sep 21, 2016
@Brocco
Copy link
Contributor

Brocco commented Sep 22, 2016

I was not able to recreate this using beta15, see here:

 ~/dev/mlb/foo (master): ng g c test
installing component
  create src/app/test/test.component.css
  create src/app/test/test.component.html
  create src/app/test/test.component.spec.ts
  create src/app/test/test.component.ts

 ~/dev/mlb/foo (master *): cd src/app/test/

 ~/dev/mlb/foo/src/app/test (master *): ng g c new-cmp
installing component
  create src/app/test/new-cmp/new-cmp.component.css
  create src/app/test/new-cmp/new-cmp.component.html
  create src/app/test/new-cmp/new-cmp.component.spec.ts
  create src/app/test/new-cmp/new-cmp.component.ts

and to show the current version...

 ~/dev/mlb/foo/src/app/test (master *): ng --version
angular-cli: 1.0.0-beta.15
node: 6.5.0
os: darwin x64

This may be a windows issue because @filipesilva was able to reproduce... @gbrigens can you please update to the latest version (beta 15) and retry? steps:

npm uninstall angular-cli -g
npm cache clean
npm install angular-cli -g

@gbrigens
Copy link
Author

@Brocco I did the update but I was still getting the same error. A guy on on Stackoverflow helped me to figure it out. Here is the link to the solution http://stackoverflow.com/questions/39478893/angular-cli-creating-files-in-the-same-folder-error. Thanks for your help.

@hansl hansl modified the milestone: RC1 Nov 11, 2016
@hansl
Copy link
Contributor

hansl commented Dec 22, 2016

Closing this as obsolete.

@hansl hansl closed this as completed Dec 22, 2016
diagramatics added a commit to diagramatics/angular-cli that referenced this issue Mar 19, 2017
The `README.md` threw me off when trying to generate a module or component that is nested in another module. This update reflects the solution in angular#2136.
filipesilva pushed a commit that referenced this issue May 8, 2017
The `README.md` threw me off when trying to generate a module or component that is nested in another module. This update reflects the solution in #2136.

Close #5506
filipesilva pushed a commit that referenced this issue May 8, 2017
The `README.md` threw me off when trying to generate a module or component that is nested in another module. This update reflects the solution in #2136.

Close #5506
filipesilva pushed a commit that referenced this issue May 8, 2017
The `README.md` threw me off when trying to generate a module or component that is nested in another module. This update reflects the solution in #2136.

Close #5506
filipesilva pushed a commit that referenced this issue May 8, 2017
The `README.md` threw me off when trying to generate a module or component that is nested in another module. This update reflects the solution in #2136.

Close #5506
hansl pushed a commit that referenced this issue May 9, 2017
The `README.md` threw me off when trying to generate a module or component that is nested in another module. This update reflects the solution in #2136.

Close #5506
dond2clouds pushed a commit to d2clouds/speedray-cli that referenced this issue Apr 23, 2018
The `README.md` threw me off when trying to generate a module or component that is nested in another module. This update reflects the solution in angular#2136.

Close angular#5506
@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
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent type: bug/fix
Projects
None yet
Development

No branches or pull requests

4 participants