You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/10/07 07:02:36 UTC

[GitHub] [incubator-superset] codepic opened a new issue #11183: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.

codepic opened a new issue #11183:
URL: https://github.com/apache/incubator-superset/issues/11183


   `docker-compose up` results in `node_superset` reporting compilation errors.
   
   ### Expected results
   
   No errors
   
   ### Actual results
   
   ```log
   superset_node            | <s> [webpack.Progress] 98% after emitting
   superset_node            | <s> [webpack.Progress] 98% after emitting SizeLimitsPlugin
   superset_node            | Type checking in progress...
   superset_node            | <s> [webpack.Progress] 100% 
   superset_node            | 
   superset_node            |    7712 modules
   superset_node            | ERROR in /app/superset-frontend/src/components/FilterableTable/FilterableTable.tsx(388,19):
   superset_node            | TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
   superset_node            | ERROR in /app/superset-frontend/src/components/FilterableTable/FilterableTable.tsx(420,17):
   superset_node            | TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.
   ```
   
   #### How to reproduce the bug
   
   1. Clone `incubator-superset` 39cce712afdc00af73daa2243cbae08a14b7dc0e
   2. `docker-compose up --build`
   3. Observe error
   
   ### Environment
   
   (please complete the following information):
   
   - superset version: 39cce712afdc00af73daa2243cbae08a14b7dc0e
   - python version: `Python 2.7.17`
   - node.js version: `v12.18.4`
   - npm version: `6.14.6`
   
   ### Checklist
   
   Make sure these boxes are checked before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [ ] I have reproduced the issue with at least the latest released version of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   
   The below diff should fix it.
   
   ```diff
   index 77b27108e..1a11f575d 100644
   --- a/superset-frontend/src/components/FilterableTable/FilterableTable.tsx
   +++ b/superset-frontend/src/components/FilterableTable/FilterableTable.tsx
   @@ -385,7 +385,7 @@ export default class FilterableTable extends PureComponent<
                ...style,
                top:
                  typeof style.top === 'number'
   -                ? style.top - GRID_POSITION_ADJUSTMENT
   +                ? (style.top as number) - GRID_POSITION_ADJUSTMENT
                    : style.top,
              }}
              className={`${className} grid-cell grid-header-cell`}
   @@ -417,7 +417,7 @@ export default class FilterableTable extends PureComponent<
              ...style,
              top:
                typeof style.top === 'number'
   -              ? style.top - GRID_POSITION_ADJUSTMENT
   +              ? (style.top as number) - GRID_POSITION_ADJUSTMENT
                  : style.top,
            }}
            className={`grid-cell ${this.rowClassName({ index: rowIndex })}`}
   
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] codepic commented on issue #11183: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.

Posted by GitBox <gi...@apache.org>.
codepic commented on issue #11183:
URL: https://github.com/apache/incubator-superset/issues/11183#issuecomment-715200284


   @shutaG the solution is in the diff in my original message. Cast the style.top as number.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] shutaG commented on issue #11183: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.

Posted by GitBox <gi...@apache.org>.
shutaG commented on issue #11183:
URL: https://github.com/apache/incubator-superset/issues/11183#issuecomment-714338501


   Hello! This problem how do you solve?I also met. Has been compiled not successful


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] junlincc closed issue #11183: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.

Posted by GitBox <gi...@apache.org>.
junlincc closed issue #11183:
URL: https://github.com/apache/incubator-superset/issues/11183


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] shutaG commented on issue #11183: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.

Posted by GitBox <gi...@apache.org>.
shutaG commented on issue #11183:
URL: https://github.com/apache/incubator-superset/issues/11183#issuecomment-715202234


   > @shutaG the solution is in the diff in my original message. Cast the style.top as number.
   
   thank you !  i get it . 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [incubator-superset] issue-label-bot[bot] commented on issue #11183: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type.

Posted by GitBox <gi...@apache.org>.
issue-label-bot[bot] commented on issue #11183:
URL: https://github.com/apache/incubator-superset/issues/11183#issuecomment-704738796


   Issue-Label Bot is automatically applying the label `#bug` to this issue, with a confidence of 0.84. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback! 
   
    Links: [app homepage](https://github.com/marketplace/issue-label-bot), [dashboard](https://mlbot.net/data/apache/incubator-superset) and [code](https://github.com/hamelsmu/MLapp) for this bot.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org