ketchuphq / ketchup

A simple CMS :tomato:
https://ketchuphq.com
Apache License 2.0
393 stars 31 forks source link

gulp gives list of the errors #5

Closed vladyslav2 closed 7 years ago

vladyslav2 commented 7 years ago

typescript: 2.4.2 node: v8.1.4 go: go version go1.8.3 darwin/amd64

ketchup$ make
make -C admin
gulp
[15:28:41] Using gulpfile ~/projects/kcmd/src/ketchup/admin/gulpfile.js
[15:28:41] Starting 'css:clean'...
[15:28:41] Starting 'css:internal'...
[15:28:41] Starting 'css:sass'...
[15:28:41] Starting 'js:clean'...
[15:28:41] Starting 'js:internal'...
[15:28:41] Starting 'js:lint'...
[15:28:42] Starting 'js:webpack'...
[15:28:42] Starting 'html'...
[15:28:42] Starting 'images'...
[15:28:42] Finished 'css:clean' after 834 ms
[15:28:42] Finished 'js:clean' after 817 ms
[15:28:43] Finished 'js:internal' after 1.75 s
[15:28:43] Finished 'html' after 965 ms
[15:28:43] Finished 'css:sass' after 1.76 s
[15:28:43] Finished 'images' after 988 ms
ts-loader: Using typescript@2.4.2 and /Users/admin/projects/kcmd/src/ketchup/admin/tsconfig.json
[15:28:44] Finished 'css:internal' after 3.01 s
[15:28:44] Starting 'css'...
[15:28:44] Finished 'css' after 48 μs
[15:28:48] [webpack]
Hash: 74bb9bd541e87d053d5c
Version: webpack 2.7.0
Time: 6902ms
        Asset    Size  Chunks                    Chunk Names
         0.js  796 kB       0  [emitted]  [big]  hljs
         1.js  430 kB       1  [emitted]  [big]  codemirror
         2.js  484 kB       2  [emitted]  [big]  quill
       app.js  150 kB       3  [emitted]         app
    vendor.js  202 kB       4  [emitted]         vendor
     0.js.map  944 kB       0  [emitted]         hljs
     1.js.map  528 kB       1  [emitted]         codemirror
     2.js.map  581 kB       2  [emitted]         quill
   app.js.map  174 kB       3  [emitted]         app
vendor.js.map  213 kB       4  [emitted]         vendor

ERROR in ./src/js/pages/settings/tls-new.tsx
(61,56): error TS2559: Type 'TLSNewComponent' has no properties in common with type 'Lifecycle<TLSNewComponentAttrs, TLSNewComponent>'.

ERROR in ./src/js/pages/settings/tls-new.tsx
(65,54): error TS2559: Type 'TLSNewComponent' has no properties in common with type 'Lifecycle<TLSNewComponentAttrs, TLSNewComponent>'.

ERROR in ./src/js/pages/page/theme_picker.tsx
(59,52): error TS2559: Type 'ThemePickerComponent' has no properties in common with type 'Lifecycle<ThemePickerAttrs, ThemePickerComponent>'.

ERROR in ./src/js/pages/page/theme_picker.tsx
(63,50): error TS2559: Type 'ThemePickerComponent' has no properties in common with type 'Lifecycle<ThemePickerAttrs, ThemePickerComponent>'.

ERROR in ./src/js/pages/page/save_button.tsx
(37,55): error TS2559: Type 'PageSaveButtonComponent' has no properties in common with type 'Lifecycle<PageSaveButtonAttrs, PageSaveButtonComponent>'.

ERROR in ./src/js/pages/page/save_button.tsx
(41,87): error TS2559: Type 'PageSaveButtonComponent' has no properties in common with type 'Lifecycle<PageSaveButtonAttrs, PageSaveButtonComponent>'.

ERROR in ./src/js/pages/page/edit_route.tsx
(56,40): error TS2559: Type 'EditRoutesComponent' has no properties in common with type 'Lifecycle<Page, EditRoutesComponent>'.

ERROR in ./src/js/pages/page/edit_route.tsx
(60,38): error TS2559: Type 'EditRoutesComponent' has no properties in common with type 'Lifecycle<Page, EditRoutesComponent>'.

ERROR in ./src/js/pages/page/buttons.tsx
(37,52): error TS2559: Type 'PageButtonsComponent' has no properties in common with type 'Lifecycle<PageButtonsAttrs, PageButtonsComponent>'.

ERROR in ./src/js/pages/page/buttons.tsx
(40,83): error TS2559: Type 'PageButtonsComponent' has no properties in common with type 'Lifecycle<PageButtonsAttrs, PageButtonsComponent>'.

ERROR in ./src/js/pages/themes.tsx
(21,38): error TS2559: Type 'ThemesPage' has no properties in common with type 'Lifecycle<{}, ThemesPage>'.

ERROR in ./src/js/pages/themes.tsx
(25,36): error TS2559: Type 'ThemesPage' has no properties in common with type 'Lifecycle<{}, ThemesPage>'.

ERROR in ./src/js/pages/themes.tsx
(54,30): error TS2559: Type 'ThemesPage' has no properties in common with type 'Lifecycle<{}, ThemesPage>'.

ERROR in ./src/js/pages/theme.tsx
(20,38): error TS2559: Type 'ThemePage' has no properties in common with type 'Lifecycle<{}, ThemePage>'.

ERROR in ./src/js/pages/theme.tsx
(24,36): error TS2559: Type 'ThemePage' has no properties in common with type 'Lifecycle<{}, ThemePage>'.

ERROR in ./src/js/pages/theme.tsx
(72,30): error TS2559: Type 'ThemePage' has no properties in common with type 'Lifecycle<{}, ThemePage>'.

ERROR in ./src/js/pages/template.tsx
(34,38): error TS2559: Type 'TemplatePage' has no properties in common with type 'Lifecycle<{}, TemplatePage>'.

ERROR in ./src/js/pages/template.tsx
(38,36): error TS2559: Type 'TemplatePage' has no properties in common with type 'Lifecycle<{}, TemplatePage>'.

ERROR in ./src/js/pages/template.tsx
(94,30): error TS2559: Type 'TemplatePage' has no properties in common with type 'Lifecycle<{}, TemplatePage>'.

ERROR in ./src/js/pages/settings.tsx
(16,5): error TS2559: Type 'false' has no properties in common with type 'TLSSettingsReponse'.

ERROR in ./src/js/pages/settings.tsx
(33,38): error TS2559: Type 'SettingsPage' has no properties in common with type 'Lifecycle<{}, SettingsPage>'.

ERROR in ./src/js/pages/settings.tsx
(37,36): error TS2559: Type 'SettingsPage' has no properties in common with type 'Lifecycle<{}, SettingsPage>'.

ERROR in ./src/js/pages/settings.tsx
(77,30): error TS2559: Type 'SettingsPage' has no properties in common with type 'Lifecycle<{}, SettingsPage>'.

ERROR in /Users/admin/projects/kcmd/src/ketchup/admin/src/js/pages/routes.tsx
(13,38): error TS2559: Type 'RoutesPage' has no properties in common with type 'Lifecycle<{}, RoutesPage>'.

ERROR in /Users/admin/projects/kcmd/src/ketchup/admin/src/js/pages/routes.tsx
(17,36): error TS2559: Type 'RoutesPage' has no properties in common with type 'Lifecycle<{}, RoutesPage>'.

ERROR in ./src/js/pages/pages.tsx
(31,38): error TS2559: Type 'PagesPage' has no properties in common with type 'Lifecycle<{}, PagesPage>'.

ERROR in ./src/js/pages/pages.tsx
(35,36): error TS2559: Type 'PagesPage' has no properties in common with type 'Lifecycle<{}, PagesPage>'.

ERROR in ./src/js/pages/pages.tsx
(86,30): error TS2559: Type 'PagesPage' has no properties in common with type 'Lifecycle<{}, PagesPage>'.

ERROR in ./src/js/pages/page.tsx
(176,38): error TS2559: Type 'PagePage' has no properties in common with type 'Lifecycle<{}, PagePage>'.

ERROR in ./src/js/pages/page.tsx
(180,36): error TS2559: Type 'PagePage' has no properties in common with type 'Lifecycle<{}, PagePage>'.

ERROR in ./src/js/pages/login.ts
(37,38): error TS2559: Type 'LoginPage' has no properties in common with type 'Lifecycle<{}, LoginPage>'.

ERROR in ./src/js/pages/login.ts
(40,36): error TS2559: Type 'LoginPage' has no properties in common with type 'Lifecycle<{}, LoginPage>'.

ERROR in ./src/js/pages/login.ts
(79,30): error TS2559: Type 'LoginPage' has no properties in common with type 'Lifecycle<{}, LoginPage>'.

ERROR in ./src/js/pages/install-theme.tsx
(30,38): error TS2559: Type 'InstallThemePage' has no properties in common with type 'Lifecycle<{}, InstallThemePage>'.

ERROR in ./src/js/pages/install-theme.tsx
(34,36): error TS2559: Type 'InstallThemePage' has no properties in common with type 'Lifecycle<{}, InstallThemePage>'.

ERROR in ./src/js/pages/data.tsx
(51,38): error TS2559: Type 'DataPage' has no properties in common with type 'Lifecycle<{}, DataPage>'.

ERROR in ./src/js/pages/data.tsx
(55,36): error TS2559: Type 'DataPage' has no properties in common with type 'Lifecycle<{}, DataPage>'.

ERROR in ./src/js/pages/data.tsx
(81,30): error TS2559: Type 'DataPage' has no properties in common with type 'Lifecycle<{}, DataPage>'.

ERROR in ./src/js/components/editors/text.tsx
(34,51): error TS2559: Type 'TextEditorComponent' has no properties in common with type 'Lifecycle<TextEditorAttrs, TextEditorComponent>'.

ERROR in ./src/js/components/editors/text.tsx
(38,49): error TS2559: Type 'TextEditorComponent' has no properties in common with type 'Lifecycle<TextEditorAttrs, TextEditorComponent>'.

ERROR in ./src/js/components/editors/text.tsx
(53,43): error TS2559: Type 'TextEditorComponent' has no properties in common with type 'Lifecycle<TextEditorAttrs, TextEditorComponent>'.

ERROR in ./src/js/components/editors/markdown.tsx
(60,51): error TS2559: Type 'CodeMirrorComponent' has no properties in common with type 'Lifecycle<CodeMirrorAttrs, CodeMirrorComponent>'.

ERROR in ./src/js/components/editors/markdown.tsx
(64,49): error TS2559: Type 'CodeMirrorComponent' has no properties in common with type 'Lifecycle<CodeMirrorAttrs, CodeMirrorComponent>'.

ERROR in ./src/js/components/editors/markdown.tsx
(76,43): error TS2559: Type 'CodeMirrorComponent' has no properties in common with type 'Lifecycle<CodeMirrorAttrs, CodeMirrorComponent>'.

ERROR in ./src/js/components/editors/html.tsx
(49,46): error TS2559: Type 'QuillComponent' has no properties in common with type 'Lifecycle<QuillAttrs, QuillComponent>'.

ERROR in ./src/js/components/editors/html.tsx
(53,44): error TS2559: Type 'QuillComponent' has no properties in common with type 'Lifecycle<QuillAttrs, QuillComponent>'.

ERROR in ./src/js/components/editors/html.tsx
(87,38): error TS2559: Type 'QuillComponent' has no properties in common with type 'Lifecycle<QuillAttrs, QuillComponent>'.

ERROR in ./src/js/components/editors/editor.ts
(22,56): error TS2559: Type 'EditorComponent' has no properties in common with type 'Lifecycle<EditorComponentAttrs, EditorComponent>'.

ERROR in ./src/js/components/editors/editor.ts
(26,54): error TS2559: Type 'EditorComponent' has no properties in common with type 'Lifecycle<EditorComponentAttrs, EditorComponent>'.

ERROR in /Users/admin/projects/kcmd/src/ketchup/admin/src/js/components/route_picker.tsx
(29,51): error TS2559: Type 'PagePickerComponent' has no properties in common with type 'Lifecycle<PagePickerAttrs, PagePickerComponent>'.

ERROR in /Users/admin/projects/kcmd/src/ketchup/admin/src/js/components/route_picker.tsx
(33,49): error TS2559: Type 'PagePickerComponent' has no properties in common with type 'Lifecycle<PagePickerAttrs, PagePickerComponent>'.

ERROR in /Users/admin/projects/kcmd/src/ketchup/admin/src/js/components/route_picker.tsx
(66,38): error TS2559: Type 'NewRouteComponent' has no properties in common with type 'Lifecycle<{}, NewRouteComponent>'.

ERROR in /Users/admin/projects/kcmd/src/ketchup/admin/src/js/components/route_picker.tsx
(70,36): error TS2559: Type 'NewRouteComponent' has no properties in common with type 'Lifecycle<{}, NewRouteComponent>'.

ERROR in ./src/js/components/navigation.tsx
(48,38): error TS2559: Type 'NavigationComponent' has no properties in common with type 'Lifecycle<{}, NavigationComponent>'.

ERROR in ./src/js/components/navigation.tsx
(52,36): error TS2559: Type 'NavigationComponent' has no properties in common with type 'Lifecycle<{}, NavigationComponent>'.

ERROR in ./src/js/components/navigation.tsx
(89,30): error TS2559: Type 'NavigationComponent' has no properties in common with type 'Lifecycle<{}, NavigationComponent>'.

ERROR in ./src/js/components/button.ts
(31,47): error TS2559: Type 'Button' has no properties in common with type 'Lifecycle<ButtonAttrs, Button>'.

ERROR in ./src/js/components/button.ts
(34,48): error TS2559: Type 'Button' has no properties in common with type 'Lifecycle<ButtonAttrs, Button>'.

ERROR in ./src/js/components/button.ts
(57,39): error TS2559: Type 'Button' has no properties in common with type 'Lifecycle<ButtonAttrs, Button>'.
[15:28:48] Finished 'js:webpack' after 6.91 s
[15:28:49] Finished 'js:lint' after 7.76 s
[15:28:49] Starting 'js'...
[15:28:49] Finished 'js' after 4.51 μs
[15:28:49] Starting 'bindata'...
[15:28:50] Finished 'bindata' after 1.32 s
[15:28:50] Starting 'default'...
[15:28:50] Finished 'default' after 15 μs
go build .
main.go:6:2: cannot find package "github.com/ketchuphq/ketchup/admin" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/github.com/ketchuphq/ketchup/admin (from $GOROOT)
    /Users/admin/projects/kcmd/src/ketchup/src/github.com/ketchuphq/ketchup/admin (from $GOPATH)
main.go:7:2: cannot find package "github.com/ketchuphq/ketchup/db/bolt" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/github.com/ketchuphq/ketchup/db/bolt (from $GOROOT)
    /Users/admin/projects/kcmd/src/ketchup/src/github.com/ketchuphq/ketchup/db/bolt (from $GOPATH)
main.go:8:2: cannot find package "github.com/ketchuphq/ketchup/server/api" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/github.com/ketchuphq/ketchup/server/api (from $GOROOT)
    /Users/admin/projects/kcmd/src/ketchup/src/github.com/ketchuphq/ketchup/server/api (from $GOPATH)
main.go:9:2: cannot find package "github.com/ketchuphq/ketchup/server/backup" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/github.com/ketchuphq/ketchup/server/backup (from $GOROOT)
    /Users/admin/projects/kcmd/src/ketchup/src/github.com/ketchuphq/ketchup/server/backup (from $GOPATH)
main.go:10:2: cannot find package "github.com/ketchuphq/ketchup/server/content" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/github.com/ketchuphq/ketchup/server/content (from $GOROOT)
    /Users/admin/projects/kcmd/src/ketchup/src/github.com/ketchuphq/ketchup/server/content (from $GOPATH)
main.go:11:2: cannot find package "github.com/ketchuphq/ketchup/server/tls" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/github.com/ketchuphq/ketchup/server/tls (from $GOROOT)
    /Users/admin/projects/kcmd/src/ketchup/src/github.com/ketchuphq/ketchup/server/tls (from $GOPATH)
main.go:4:2: cannot find package "github.com/octavore/naga/service" in any of:
    /usr/local/Cellar/go/1.8.3/libexec/src/github.com/octavore/naga/service (from $GOROOT)
    /Users/admin/projects/kcmd/src/ketchup/src/github.com/octavore/naga/service (from $GOPATH)
make: *** [dev] Error 1
octavore commented 7 years ago

That error occurs when trying to compile with typescript 2.4 (due to a change with weak types, where all type properties are optional).

It's fixed on the current branch I'm working on, which hopefully will get merged in soon.

For now, you can try downgrading your typescript version to 2.3.x to get it to compile without errors.

(unrelated to the Typescript error, but it looks like you also have some go build errors, which you can fix by running make prepare-vendor to pull in the vendored dependencies)

vladyslav2 commented 7 years ago

@octavore thanks for a response

vladyslav2 commented 7 years ago

@octavore i'm really really new in typescript, but base on what i google, mithril-query.d.ts should looks like this:

/**                                                                               
 * Provide definitions for https://github.com/StephanHoyer/mithril-query          
 */                                                                               
declare module 'mithril-query' {                                                  
  import * as Mithril from "mithril";                                             

  export interface mq {                                                           
    <A, S>(element: Mithril.Component<A, S>, attrs?: A): AssertionStatic<A, S>; 
    <A, S>(vnode: Mithril.Vnode<A, S>): AssertionStatic<A, S>;                    
  }                                                                               

  type Vnode<A,S> = Mithril.Vnode<A, S> & { text: string }                        

  export interface AssertionStatic<A, S> {                                        
    first(selector: string): Mithril.Vnode<A, S>;                                 
    find(selector: string): Vnode<A,S>[];                                         
    has(selector: string): boolean;                                               
    contains(str: string): boolean;                                               

    redraw(): void;                                                               
    click(selector: string): void;                                                
    vnode: Mithril.Vnode<A, S>;                                                   
    log(selector: string): void;                                                  
    rootNode: any                                                                 
  }                                                                               
} 

declare module 'mithril-query' should be before imports.

but still, i cannot figure out an error on https://github.com/ketchuphq/ketchup/blob/tp/themes/admin/src/js/components/content.test.tsx#L11

ERROR in ketchup/admin/src/js/components/content.test.tsx
(13,15): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'typeof 'mithril-query'' has no compatible call signatures.