angular-fullstack / generator-angular-fullstack

Yeoman generator for an Angular app with an Express server
https://awk34.gitbook.io/generator-angular-fullstack
6.12k stars 1.24k forks source link

grunt serve:dist gets Error: [$compile:multidir] #1799

Closed aabm00 closed 8 years ago

aabm00 commented 8 years ago
Item Version
generator-angular-fullstack 3.5.0
Node 4.2.3
npm 3.7.5
Operating System Windows 7
etc etc
Item Answer
Transpiler TypeScript
Markup HTML
CSS CSS
Router ui-router
Build Tool Grunt
Client Tests Jasmine
DB MongoDB
Auth Y
etc socket.io

The temlate project works fine when I execute grunt serve, but when I build the application executing build and for a preview grunt serve:dist I get the next errors:

Error: [$compile:multidir] Multiple directives [navbar (module: iotfs15App), navbar (module: iotfs15App)] asking for template on: http://errors.angularjs.org/1.5.3/$compile/multidir?p0=navbar&p1=%20(module…5App)&p2=navbar&p3=%20(module%3A%20iotfs15App)&p4=template&p5=%3Cnavbar%3E at vendor.3a42d300.js:3 at fa (vendor.3a42d300.js:4) at X (vendor.3a42d300.js:4) at vendor.3a42d300.js:4 at h (vendor.3a42d300.js:5) at vendor.3a42d300.js:5 at n.$eval (vendor.3a42d300.js:6) at n.$digest (vendor.3a42d300.js:5) at n.$apply (vendor.3a42d300.js:6) at vendor.3a42d300.js:3

Error: [$compile:multidir] Multiple directives [footer (module: iotfs15App), footer (module:iotfs15App)] asking for template on:

Awk34 commented 8 years ago

Is this directly after generating, or have you changed things?

aabm00 commented 8 years ago

Just after generating.

Awk34 commented 8 years ago

Think you can dump your dist folder into a zip?

aabm00 commented 8 years ago

Hi @Awk34

I have reinstalled the generator with the last updates and generated a new project with the same configuration above. After executing grunt to build the app a make a preview of the built app it look right.

The only thing I got was the errors bellow related with typescript when making the built. Is it normal?

Using tsc v1.7.3
D:/002_IOT/WS_IOT/iotfs35/client/app/account/login/login.controller.ts(5,10)

: error TS2339: Property 'user' does not exist on type 'LoginController'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/login/login.controller.ts(6,10) : error TS2339: Property 'errors' does not exist on type 'LoginController'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/login/login.controller.ts(7,10) : error TS2339: Property 'submitted' does not exist on type 'LoginController'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/login/login.controller.ts(9,10) : error TS2339: Property 'Auth' does not exist on type 'LoginController'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/login/login.controller.ts(10,10 ): error TS2339: Property '$state' does not exist on type 'LoginController'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/login/login.controller.ts(14,10 ): error TS2339: Property 'submitted' does not exist on type 'LoginController'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/login/login.controller.ts(17,12 ): error TS2339: Property 'Auth' does not exist on type 'LoginController'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/login/login.controller.ts(18,21 ): error TS2339: Property 'user' does not exist on type 'LoginController'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/login/login.controller.ts(19,24 ): error TS2339: Property 'user' does not exist on type 'LoginController'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/login/login.controller.ts(23,14 ): error TS2339: Property '$state' does not exist on type 'LoginController'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/login/login.controller.ts(26,14 ): error TS2339: Property 'errors' does not exist on type 'LoginController'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/settings/settings.controller.ts (5,10): error TS2339: Property 'errors' does not exist on type 'SettingsControll er'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/settings/settings.controller.ts (6,10): error TS2339: Property 'submitted' does not exist on type 'SettingsContr oller'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/settings/settings.controller.ts (8,10): error TS2339: Property 'Auth' does not exist on type 'SettingsController '. D:/002_IOT/WS_IOT/iotfs35/client/app/account/settings/settings.controller.ts (12,10): error TS2339: Property 'submitted' does not exist on type 'SettingsCont roller'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/settings/settings.controller.ts (15,12): error TS2339: Property 'Auth' does not exist on type 'SettingsControlle r'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/settings/settings.controller.ts (15,37): error TS2339: Property 'user' does not exist on type 'SettingsControlle r'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/settings/settings.controller.ts (15,60): error TS2339: Property 'user' does not exist on type 'SettingsControlle r'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/settings/settings.controller.ts (17,16): error TS2339: Property 'message' does not exist on type 'SettingsContro ller'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/settings/settings.controller.ts (21,16): error TS2339: Property 'errors' does not exist on type 'SettingsControl ler'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/settings/settings.controller.ts (22,16): error TS2339: Property 'message' does not exist on type 'SettingsContro ller'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/signup/signup.controller.ts(11, 10): error TS2339: Property 'Auth' does not exist on type 'SignupController'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/signup/signup.controller.ts(12, 10): error TS2339: Property '$state' does not exist on type 'SignupController'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/signup/signup.controller.ts(19, 12): error TS2339: Property 'Auth' does not exist on type 'SignupController'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/signup/signup.controller.ts(20, 25): error TS2339: Property 'name' does not exist on type '{}'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/signup/signup.controller.ts(21, 26): error TS2339: Property 'email' does not exist on type '{}'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/signup/signup.controller.ts(22, 29): error TS2339: Property 'password' does not exist on type '{}'. D:/002_IOT/WS_IOT/iotfs35/client/app/account/signup/signup.controller.ts(26, 14): error TS2339: Property '$state' does not exist on type 'SignupController'. D:/002_IOT/WS_IOT/iotfs35/client/app/admin/admin.controller.ts(8,10): error TS2339: Property 'users' does not exist on type 'AdminController'. D:/002_IOT/WS_IOT/iotfs35/client/app/admin/admin.controller.ts(13,10): error TS2339: Property 'users' does not exist on type 'AdminController'. D:/002_IOT/WS_IOT/iotfs35/client/app/admin/admin.controller.ts(13,28): error TS2339: Property 'users' does not exist on type 'AdminController'. D:/002_IOT/WS_IOT/iotfs35/client/app/main/main.controller.ts(8,10): error TS 2339: Property '$http' does not exist on type 'MainController'. D:/002_IOT/WS_IOT/iotfs35/client/app/main/main.controller.ts(9,10): error TS 2339: Property 'socket' does not exist on type 'MainController'. D:/002_IOT/WS_IOT/iotfs35/client/app/main/main.controller.ts(10,10): error T S2339: Property 'awesomeThings' does not exist on type 'MainController'. D:/002_IOT/WS_IOT/iotfs35/client/app/main/main.controller.ts(18,10): error T S2339: Property '$http' does not exist on type 'MainController'. D:/002_IOT/WS_IOT/iotfs35/client/app/main/main.controller.ts(19,12): error T S2339: Property 'awesomeThings' does not exist on type 'MainController'. D:/002_IOT/WS_IOT/iotfs35/client/app/main/main.controller.ts(20,12): error T S2339: Property 'socket' does not exist on type 'MainController'. D:/002_IOT/WS_IOT/iotfs35/client/app/main/main.controller.ts(20,45): error T S2339: Property 'awesomeThings' does not exist on type 'MainController'. D:/002_IOT/WS_IOT/iotfs35/client/app/main/main.controller.ts(25,14): error T S2339: Property 'newThing' does not exist on type 'MainController'. D:/002_IOT/WS_IOT/iotfs35/client/app/main/main.controller.ts(26,12): error T S2339: Property '$http' does not exist on type 'MainController'. D:/002_IOT/WS_IOT/iotfs35/client/app/main/main.controller.ts(26,51): error T S2339: Property 'newThing' does not exist on type 'MainController'. D:/002_IOT/WS_IOT/iotfs35/client/app/main/main.controller.ts(27,12): error T S2339: Property 'newThing' does not exist on type 'MainController'. D:/002_IOT/WS_IOT/iotfs35/client/app/main/main.controller.ts(32,10): error T S2339: Property '$http' does not exist on type 'MainController'. D:/002_IOT/WS_IOT/iotfs35/client/app/main/main.controller.ts(37,4): error TS 2339: Property 'component' does not exist on type 'IModule'. D:/002_IOT/WS_IOT/iotfs35/client/components/auth/auth.service.ts(31,30): err or TS2339: Property '$promise' does not exist on type '{}'. D:/002_IOT/WS_IOT/iotfs35/client/components/auth/auth.service.ts(81,52): err or TS2339: Property '_id' does not exist on type '{}'. D:/002_IOT/WS_IOT/iotfs35/client/components/auth/auth.service.ts(104,21): er ror TS2339: Property '$promise' does not exist on type '{}'. D:/002_IOT/WS_IOT/iotfs35/client/components/auth/auth.service.ts(149,36): er ror TS2339: Property 'role' does not exist on type '{}'. D:/002_IOT/WS_IOT/iotfs35/client/components/mongoose-error/mongoose-error.di rective.ts(12,45): error TS2339: Property '$setValidity' does not exist on type '{}'. D:/002_IOT/WS_IOT/iotfs35/client/components/navbar/navbar.controller.ts(14,1 0): error TS2339: Property 'isLoggedIn' does not exist on type 'NavbarController '. D:/002_IOT/WS_IOT/iotfs35/client/components/navbar/navbar.controller.ts(15,1 0): error TS2339: Property 'isAdmin' does not exist on type 'NavbarController'. D:/002_IOT/WS_IOT/iotfs35/client/components/navbar/navbar.controller.ts(16,1 0): error TS2339: Property 'getCurrentUser' does not exist on type 'NavbarContro ller'

.

Awk34 commented 8 years ago

Yes, these should all just be type errors from the TS compiler. As of right now, the TS and JS files are the same, just with different extensions. Adding the proper types is on my todo list.

ksarpash commented 8 years ago

Why did you not include the proper types? The project doesn't work without them!!!

Awk34 commented 8 years ago

@ksarpash It is in progress. The project does work without them, though; you just get warnings.

dylannnn commented 8 years ago

@Awk34 I have the same "Warning":

client\app\account\login\login.controller.ts(5,10): error TS2339: Property 'user' does not exist on type 'LoginController'. client\app\account\login\login.controller.ts(6,10): error TS2339: Property 'errors' does not exist on type 'LoginController'. client\app\account\login\login.controller.ts(7,10): error TS2339: Property 'submitted' does not exist on type 'LoginController'. client\app\account\login\login.controller.ts(9,10): error TS2339: Property 'Auth' does not exist on type 'LoginController'. client\app\account\login\login.controller.ts(10,10): error TS2339: Property '$state' does not exist on type 'LoginController'. client\app\account\login\login.controller.ts(14,10): error TS2339: Property 'submitted' does not exist on type 'LoginController'. client\app\account\login\login.controller.ts(17,12): error TS2339: Property 'Auth' does not exist on type 'LoginController'. client\app\account\login\login.controller.ts(18,21): error TS2339: Property 'user' does not exist on type 'LoginController'. client\app\account\login\login.controller.ts(19,24): error TS2339: Property 'user' does not exist on type 'LoginController'. client\app\account\login\login.controller.ts(23,14): error TS2339: Property '$state' does not exist on type 'LoginController'. client\app\account\login\login.controller.ts(26,14): error TS2339: Property 'errors' does not exist on type 'LoginController'. client\app\account\settings\settings.controller.ts(8,10): error TS2339: Property 'Auth' does not exist on type 'SettingsController'. client\app\account\settings\settings.controller.ts(15,12): error TS2339: Property 'Auth' does not exist on type 'SettingsController'. client\app\account\settings\settings.controller.ts(15,37): error TS2339: Property 'user' does not exist on type 'SettingsController'. client\app\account\settings\settings.controller.ts(15,60): error TS2339: Property 'user' does not exist on type 'SettingsController'. client\app\account\settings\settings.controller.ts(17,16): error TS2339: Property 'message' does not exist on type 'SettingsController'. client\app\account\settings\settings.controller.ts(21,23): error TS2339: Property 'other' does not exist on type '{}'. client\app\account\settings\settings.controller.ts(22,16): error TS2339: Property 'message' does not exist on type 'SettingsController'. client\app\account\signup\signup.controller.ts(11,10): error TS2339: Property 'Auth' does not exist on type 'SignupController'. client\app\account\signup\signup.controller.ts(12,10): error TS2339: Property '$state' does not exist on type 'SignupController'. client\app\account\signup\signup.controller.ts(19,12): error TS2339: Property 'Auth' does not exist on type 'SignupController'. client\app\account\signup\signup.controller.ts(20,25): error TS2339: Property 'name' does not exist on type '{}'. client\app\account\signup\signup.controller.ts(21,26): error TS2339: Property 'email' does not exist on type '{}'. client\app\account\signup\signup.controller.ts(22,29): error TS2339: Property 'password' does not exist on type '{}'. client\app\account\signup\signup.controller.ts(26,14): error TS2339: Property '$state' does not exist on type 'SignupController'. client\app\main\main.controller.ts(8,10): error TS2339: Property '$http' does not exist on type 'MainController'. client\app\main\main.controller.ts(9,10): error TS2339: Property 'socket' does not exist on type 'MainController'. client\app\main\main.controller.ts(10,10): error TS2339: Property 'awesomeThings' does not exist on type 'MainController'. client\app\main\main.controller.ts(18,10): error TS2339: Property '$http' does not exist on type 'MainController'. client\app\main\main.controller.ts(19,12): error TS2339: Property 'awesomeThings' does not exist on type 'MainController'. client\app\main\main.controller.ts(20,12): error TS2339: Property 'socket' does not exist on type 'MainController'. client\app\main\main.controller.ts(20,45): error TS2339: Property 'awesomeThings' does not exist on type 'MainController'. client\app\main\main.controller.ts(25,14): error TS2339: Property 'newThing' does not exist on type 'MainController'. client\app\main\main.controller.ts(26,12): error TS2339: Property '$http' does not exist on type 'MainController'. client\app\main\main.controller.ts(26,51): error TS2339: Property 'newThing' does not exist on type 'MainController'. client\app\main\main.controller.ts(27,12): error TS2339: Property 'newThing' does not exist on type 'MainController'. client\app\main\main.controller.ts(32,10): error TS2339: Property '$http' does not exist on type 'MainController'. client\components\auth\auth.service.ts(31,30): error TS2339: Property '$promise' does not exist on type '{}'. client\components\auth\auth.service.ts(81,52): error TS2339: Property '_id' does not exist on type '{}'. client\components\auth\auth.service.ts(104,21): error TS2339: Property '$promise' does not exist on type '{}'. client\components\auth\auth.service.ts(149,36): error TS2339: Property 'role' does not exist on type '{}'. client\components\mongoose-error\mongoose-error.directive.ts(12,45): error TS2339: Property '$setValidity' does not exist on type '{}'. client\components\navbar\navbar.controller.ts(14,10): error TS2339: Property 'isLoggedIn' does not exist on type 'NavbarController'. client\components\navbar\navbar.controller.ts(15,10): error TS2339: Property 'isAdmin' does not exist on type 'NavbarController'. client\components\navbar\navbar.controller.ts(16,10): error TS2339: Property 'getCurrentUser' does not exist on type 'NavbarController'. C:/projects/mean/typings/main/ambient/jquery/index.d.ts(3192,13): error TS2403: Subsequent variable declarations must have the same type. Variable '$' must be of type 'cssSelectorHelper', but here has type 'JQueryStatic'. [10:20:25] TypeScript: 46 semantic errors [10:20:25] TypeScript: emit succeeded (with errors)

Looking forward for the new version. Thanks for all of your effort!

Awk34 commented 8 years ago

See #2025