Skip to content

Universal schema uses hardcoded src value instead of angular.json value #12104

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
alexeagle opened this issue Sep 4, 2018 · 2 comments · Fixed by #23463
Closed

Universal schema uses hardcoded src value instead of angular.json value #12104

alexeagle opened this issue Sep 4, 2018 · 2 comments · Fixed by #23463
Assignees
Labels
2022Q3 Fixit Candidates for the Q3 2022 fix-it area: @schematics/angular freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Milestone

Comments

@alexeagle
Copy link
Contributor

From @GJordan904 on May 11, 2018 7:5

Bug Report or Feature Request (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request

Area

- [ ] devkit
- [x ] schematics

Versions

node 10.1.0
npm 6.0.1
angular 6.0.1
angular-devkit 0.6.1

Repro steps

Start a project with the CLI and change srcRoot to something other than src, I will use browser. Then run ng generate universal --client-project ng-universal-test --app-dir browser

The log given by the failure

Module file (/src/app/app.module.ts) not found

Desired functionality

Instead of hardcoding src, use the value from angular.json, or --app-dir unless that is for something else.

Mention any other details that might be useful

Nothing more, pretty simple.

EDIT

Well it looks like the --source-dir option no longer exists for ng-new and as a result, nothing ran after it checks for it either. Oh well, my oversight. I would like to be able to change the src directory name though as I like to make a browser folder for my client app and a server folder for my express app.

Copied from original issue: angular/devkit#894

@Pringels
Copy link

+1 please address this

@alan-agius4 alan-agius4 self-assigned this Oct 2, 2019
@ngbot ngbot bot added this to the Backlog milestone Oct 2, 2019
@alan-agius4 alan-agius4 added freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix and removed area: @schematics/angular feature Issue that requests a new feature labels Oct 3, 2019
@ngbot ngbot bot modified the milestone: Backlog Oct 3, 2019
@alan-agius4 alan-agius4 removed their assignment Oct 3, 2019
@ngbot ngbot bot added this to the Backlog milestone Oct 3, 2019
@alan-agius4 alan-agius4 added the 2022Q3 Fixit Candidates for the Q3 2022 fix-it label Jun 29, 2022
@alan-agius4 alan-agius4 self-assigned this Jun 29, 2022
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jun 29, 2022
…sal schematic

With this change we remove the usage of harded `src` directory and instead infer this from the `sourceRoot` project option.

We also remove the `angularCompilerOptions.entryModule` property in the server tsconfig as this is no longer needed with Ivy.

Closes angular#12104
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Jun 29, 2022
…sal schematic

With this change we remove the usage of hard coded `src` directory and instead infer this from the `sourceRoot` project option.

We also remove the `angularCompilerOptions.entryModule` property in the server tsconfig as this is no longer needed with Ivy.

Closes angular#12104
clydin pushed a commit that referenced this issue Jun 29, 2022
…sal schematic

With this change we remove the usage of hard coded `src` directory and instead infer this from the `sourceRoot` project option.

We also remove the `angularCompilerOptions.entryModule` property in the server tsconfig as this is no longer needed with Ivy.

Closes #12104
clydin pushed a commit that referenced this issue Jun 29, 2022
…sal schematic

With this change we remove the usage of hard coded `src` directory and instead infer this from the `sourceRoot` project option.

We also remove the `angularCompilerOptions.entryModule` property in the server tsconfig as this is no longer needed with Ivy.

Closes #12104

(cherry picked from commit ab8ab30)
@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 Jul 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
2022Q3 Fixit Candidates for the Q3 2022 fix-it area: @schematics/angular freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Projects
None yet
3 participants