disqus / disqus-wordpress-plugin

WordPress plugin for Disqus (Latest version)
https://disqus.com/
34 stars 25 forks source link

Error on make js #12

Closed phh closed 6 years ago

phh commented 7 years ago

$ make js

yarn run build
yarn run v1.2.1
$ yarn run build:dev && yarn run build:dist
 10% [0] building modules 0/1 modules 1 active ...disqus-clone/frontend/src/ts/index.ts
[at-loader] Using typescript@2.5.3 from typescript and "tsconfig.json" from /vagrant/.../wp-content/plugins/disqus-wordpress-plugin/tsconfig.json.
                                                                                                                                                       94% [0] asset optimization                                                            [at-loader] Checking started in a separate process...

[at-loader] Checking finished with 2 errors                                                                                                                                                                       [0] Hash: 544b5c5ecd134718d405
Version: webpack 3.7.1
Child
    Hash: 544b5c5ecd134718d405
    Time: 22914ms
                            Asset     Size  Chunks                    Chunk Names
        en.disqus-admin.bundle.js  1.12 MB       0  [emitted]  [big]  main
    en.disqus-admin.bundle.js.map  1.34 MB       0  [emitted]         main
       [7] ./frontend/src/ts/containers.ts 5.23 kB {0} [built]
       [8] ./frontend/src/ts/utils.ts 388 bytes {0} [built]
      [15] ./frontend/src/ts/actions.ts 1.83 kB {0} [built]
      [28] (webpack)/buildin/global.js 509 bytes {0} [built]
      [33] ./frontend/src/ts/reducers/AdminState.ts 2.25 kB {0} [built]
      [36] ./frontend/src/ts/rest.ts 1.14 kB {0} [built]
      [37] ./frontend/src/ts/index.ts 98 bytes {0} [built]
      [38] ./frontend/src/ts/app.tsx 1.94 kB {0} [built]
      [71] (webpack)/buildin/module.js 517 bytes {0} [built]
      [81] ./frontend/src/ts/reducers/AdminOptions.ts 1.42 kB {0} [built]
      [82] ./frontend/src/ts/reducers/SyncStatus.ts 1.27 kB {0} [built]
      [92] ./frontend/src/ts/reducers/adminApp.ts 1.74 kB {0} [built]
        + 81 hidden modules

    ERROR in [at-loader] ./frontend/src/ts/app.tsx:62:32
        TS2345: Argument of type '(response: IRestResponse<ISyncStatus>) => void' is not assignable to parameter of type '(response: IRestResponse<IAdminOptions>) => void'.
      Types of parameters 'response' and 'response' are incompatible.
        Type 'IRestResponse<IAdminOptions>' is not assignable to type 'IRestResponse<ISyncStatus>'.
          Type 'IAdminOptions' has no properties in common with type 'ISyncStatus'.

    ERROR in [at-loader] ./frontend/src/ts/app.tsx:65:32
        TS2345: Argument of type 'IRestResponse<ISyncStatus>' is not assignable to parameter of type 'IRestResponse<IAdminOptions>'.
      Type 'ISyncStatus' has no properties in common with type 'IAdminOptions'.
error Command failed with exit code 2.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
make: *** [js] Error 1

Why not just bundle the build js inside of the disqus plugin folder?

ryanvalentin commented 6 years ago

I can't seem to reproduce this currently, does this work on the latest master?

Also the output target for the bundle is now inside of the plugin folder, if that's what you meant.

https://github.com/disqus/disqus-wordpress-plugin/blob/master/webpack.config.js#L16