Skip to content

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

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
aabm00 opened this issue Apr 20, 2016 · 9 comments
Closed

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

aabm00 opened this issue Apr 20, 2016 · 9 comments

Comments

@aabm00
Copy link

aabm00 commented Apr 20, 2016

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:

http://errors.angularjs.org/1.5.3/$compile/multidir?p0=footer&p1=%20(module…5App)&p2=footer&p3=%20(module%3A%20iotfs15App)&p4=template&p5=%3Cfooter%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 [main, main] asking for template on:

http://errors.angularjs.org/1.5.3/$compile/multidir?p0=main&p1=&p2=main&p3=&p4=template&p5=%3Cmain%20class%3D%22ng-scope%22%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

Why the preview for a local app works fine and the preview for a built app gives errors?

Thanks

@Awk34
Copy link
Member

Awk34 commented Apr 20, 2016

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

@aabm00
Copy link
Author

aabm00 commented Apr 20, 2016

Just after generating.

@Awk34
Copy link
Member

Awk34 commented Apr 20, 2016

Think you can dump your dist folder into a zip?

@aabm00
Copy link
Author

aabm00 commented Apr 21, 2016

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
Copy link
Member

Awk34 commented Apr 21, 2016

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.

@Awk34 Awk34 closed this as completed Apr 21, 2016
@ksarpash
Copy link

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

@Awk34
Copy link
Member

Awk34 commented Jun 28, 2016

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

@dylannnn
Copy link

@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
Copy link
Member

Awk34 commented Jun 29, 2016

See #2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants