Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.37 KB | None | 0 0
  1. ### Versions.
  2. ALL UP TO DATE TODAY (2017-08-23)
  3. @angular/cli: 1.3.1
  4. node: 8.3.0
  5. os: win32 x64
  6. @angular/animations: 4.3.5
  7. @angular/common: 4.3.5
  8. @angular/compiler: 4.3.5
  9. @angular/core: 4.3.5
  10. @angular/forms: 4.3.5
  11. @angular/http: 4.3.5
  12. @angular/platform-browser: 4.3.5
  13. @angular/platform-browser-dynamic: 4.3.5
  14. @angular/router: 4.3.5
  15. @angular/cli: 1.3.1
  16. @angular/compiler-cli: 4.3.5
  17. @angular/language-service: 4.3.5
  18.  
  19. ### Repro steps.
  20. <!--
  21. Simple steps to reproduce this bug.
  22. Please include: commands run, packages added, related code changes.
  23. A link to a sample repo would help too.
  24. -->
  25. ###
  26.  
  27. ### Method 1 WITH Parameter - Compile **with** ERROR using ng build --prod ( with aot ) and **without** ERROR when compile using ng build --prod --aot=false (without aot)
  28.  
  29. **Into the service:**
  30. `
  31. @Injectable()
  32. export class MvsTest {
  33. public Test: string = "";
  34. constructor(param: string) {
  35. this.Test = param;
  36. }
  37. }
  38. `
  39. **into the other service**
  40. `
  41. @Injectable()
  42. export class ApplicationService {
  43. public test1 = new MvsTest ('New1');
  44. public test2 = new MvsTest ('New'2);
  45. constructor() { }
  46. }
  47. `
  48. ### Method 2 WITHOUT Parameter - Compile **without** ERROR using ng build --prod ( with aot ) and **without** ERROR when compile using ng build --prod --aot=false (without aot)
  49.  
  50. **Into the service:**
  51. `
  52. @Injectable()
  53. export class MvsTest {
  54. public Test: string = "";
  55. constructor() { }
  56. }
  57. `
  58. **into the other service**
  59. `
  60. @Injectable()
  61. export class ApplicationService {
  62. public test1 = new MvsTest ();
  63. public test2 = new MvsTest ();
  64. constructor() {
  65. this.test1.Test= 'New1';
  66. this.test2.Test= 'New2';
  67. }
  68. }
  69. `
  70.  
  71. ### The log given by the failure.
  72. <!-- Normally this include a stack trace and some more information. -->
  73. ERROR in Can't resolve all parameters for MvsTest in C:/DEVELOPER/_SHARED/mvs-test/mvs-test.service.ts: (?).
  74. ERROR in ./src/main.ts..... etc...etc...etc...
  75.  
  76. ERROR in Can't resolve all parameters for MvsTest in C:/DEVELOPER/src/app/_SHARED/mvs-test/mvs-test.service.ts: (?).
  77. ERROR in ./src/main.ts
  78. Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'C:DEVELOPERsrc'
  79. resolve './$$_gendir/app/app.module.ngfactory' in 'C:DEVELOPERsrc'
  80. using description file: C:DEVELOPERpackage.json (relative path: ./src)
  81. Field 'browser' doesn't contain a valid alias configuration
  82. after using description file: C:DEVELOPERpackage.json (relative path: ./src)
  83. using description file: C:DEVELOPERpackage.json (relative path: ./src/$$_gendir/app/app.module.ngfactory)
  84. no extension
  85. Field 'browser' doesn't contain a valid alias configuration
  86. C:DEVELOPERsrc$$_gendirappapp.module.ngfactory doesn't exist
  87. .ts
  88. Field 'browser' doesn't contain a valid alias configuration
  89. C:DEVELOPERsrc$$_gendirappapp.module.ngfactory.ts doesn't exist
  90. .js
  91. Field 'browser' doesn't contain a valid alias configuration
  92. C:DEVELOPERsrc$$_gendirappapp.module.ngfactory.js doesn't exist
  93. as directory
  94. C:DEVELOPERsrc$$_gendirappapp.module.ngfactory doesn't exist
  95. [C:DEVELOPERsrc$$_gendirappapp.module.ngfactory]
  96. [C:DEVELOPERsrc$$_gendirappapp.module.ngfactory.ts]
  97. [C:DEVELOPERsrc$$_gendirappapp.module.ngfactory.js]
  98. [C:DEVELOPERsrc$$_gendirappapp.module.ngfactory]
  99. @ ./src/main.ts 3:0-74
  100. @ multi ./src/main.ts
  101.  
  102. ### Desired functionality.
  103. <!--
  104. What would like to see implemented?
  105. What is the usecase?
  106. -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement