question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'import/order' errors when building the front end assets

See original GitHub issue

Issue Summary

When running npm run build for the first time, following the Docker Based Development Installation Guide, several errors are shown:

WARNING in ./client/app/pages/alert/index.js
Module Error (from ./node_modules/eslint-loader/index.js):

/home/jc/redash/client/app/pages/alert/index.js
  3:1  error  `antd/lib/modal` import should occur before import of `@/services/notification`  import/order

✖ 1 problem (1 error, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.

 @ [\\/.]test[\\.\/]).)*\.jsx?$ (./client/app/pages sync ^((?![\\/.]test[\\.\/]).)*\.jsx?$) ./alert/index.js
 @ ./client/app/config/index.js
 @ ./client/app/index.js
 @ multi ./client/app/index.js ./client/app/assets/less/main.less ./client/app/assets/less/ant.less

WARNING in ./client/app/visualizations/choropleth/index.js
Module Error (from ./node_modules/eslint-loader/index.js):

/home/jc/redash/client/app/visualizations/choropleth/index.js
  7:1  error  `angular2react` import should occur before import of `@/lib/value-format`  import/order

✖ 1 problem (1 error, 0 warnings)

 @ [\\/.]test[\\.\/]).)*\.jsx?$ (./client/app/visualizations sync ^((?![\\/.]test[\\.\/]).)*\.jsx?$) ./choropleth/index.js
 @ ./client/app/config/index.js
 @ ./client/app/index.js
 @ multi ./client/app/index.js ./client/app/assets/less/main.less ./client/app/assets/less/ant.less

WARNING in ./client/app/visualizations/details/DetailsRenderer.jsx
Module Error (from ./node_modules/eslint-loader/index.js):

/home/jc/redash/client/app/visualizations/details/DetailsRenderer.jsx
  4:1  error  `antd/lib/pagination` import should occur before import of `@/visualizations`  import/order

✖ 1 problem (1 error, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.

 @ [\\/.]test[\\.\/]).)*\.jsx?$ (./client/app/visualizations sync ^((?![\\/.]test[\\.\/]).)*\.jsx?$) ./details/DetailsRenderer.jsx
 @ ./client/app/config/index.js
 @ ./client/app/index.js
 @ multi ./client/app/index.js ./client/app/assets/less/main.less ./client/app/assets/less/ant.less

WARNING in ./client/app/visualizations/sunburst/index.js
Module Error (from ./node_modules/eslint-loader/index.js):

/home/jc/redash/client/app/visualizations/sunburst/index.js
  3:1  error  `angular2react` import should occur before import of `@/lib/visualizations/sunburst`  import/order

✖ 1 problem (1 error, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.

 @ [\\/.]test[\\.\/]).)*\.jsx?$ (./client/app/visualizations sync ^((?![\\/.]test[\\.\/]).)*\.jsx?$) ./sunburst/index.js
 @ ./client/app/config/index.js
 @ ./client/app/index.js
 @ multi ./client/app/index.js ./client/app/assets/less/main.less ./client/app/assets/less/ant.less

Are these safe to ignore, or do they indicate a problem we should fix? 😄

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
justincliftcommented, Sep 3, 2019

Interesting. Setting up a new laptop (with OpenSuSE Leap 15.x) tonight, so that’ll be a good chance to see if this happens with that too. Should have further info tonight/tomorrow morning (depending on how it goes). 😉

1reaction
justincliftcommented, Sep 3, 2019

New error and warning output, from running npm run build on a fresh git clone:

WARNING in ./client/app/components/ParameterValueInput.jsx
Module Error (from ./node_modules/eslint-loader/index.js):

/home/jc/git_repos/redash/redash/client/app/components/ParameterValueInput.jsx
   8:1  error  `lodash` import should occur before import of `@/components/dynamic-parameters/DateParameter`  import/order
  56:7  error  Do not use setState in componentDidUpdate                                                      react/no-did-update-set-state

✖ 2 problems (2 errors, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.

 @ [\\\/.]test[\\.\/]).)*\.jsx?$ (./client/app/components sync ^((?![\\\/.]test[\\.\/]).)*\.jsx?$) ./ParameterValueInput.jsx
 @ ./client/app/config/index.js
 @ ./client/app/index.js
 @ multi ./client/app/index.js ./client/app/assets/less/main.less ./client/app/assets/less/ant.less

WARNING in ./client/app/components/Parameters.jsx
Module Error (from ./node_modules/eslint-loader/index.js):

/home/jc/git_repos/redash/redash/client/app/components/Parameters.jsx
  67:7  error  Do not use setState in componentDidUpdate  react/no-did-update-set-state

✖ 1 problem (1 error, 0 warnings)

 @ [\\\/.]test[\\.\/]).)*\.jsx?$ (./client/app/components sync ^((?![\\\/.]test[\\.\/]).)*\.jsx?$) ./Parameters.jsx
 @ ./client/app/config/index.js
 @ ./client/app/index.js
 @ multi ./client/app/index.js ./client/app/assets/less/main.less ./client/app/assets/less/ant.less

WARNING in ./client/app/pages/alert/index.js
Module Error (from ./node_modules/eslint-loader/index.js):

/home/jc/git_repos/redash/redash/client/app/pages/alert/index.js
  3:1  error  `antd/lib/modal` import should occur before import of `@/services/notification`  import/order

✖ 1 problem (1 error, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.

 @ [\\\/.]test[\\.\/]).)*\.jsx?$ (./client/app/pages sync ^((?![\\\/.]test[\\.\/]).)*\.jsx?$) ./alert/index.js
 @ ./client/app/config/index.js
 @ ./client/app/index.js
 @ multi ./client/app/index.js ./client/app/assets/less/main.less ./client/app/assets/less/ant.less

WARNING in ./client/app/visualizations/choropleth/index.js
Module Error (from ./node_modules/eslint-loader/index.js):

/home/jc/git_repos/redash/redash/client/app/visualizations/choropleth/index.js
  7:1  error  `angular2react` import should occur before import of `@/lib/value-format`  import/order

✖ 1 problem (1 error, 0 warnings)

 @ [\\\/.]test[\\.\/]).)*\.jsx?$ (./client/app/visualizations sync ^((?![\\\/.]test[\\.\/]).)*\.jsx?$) ./choropleth/index.js
 @ ./client/app/config/index.js
 @ ./client/app/index.js
 @ multi ./client/app/index.js ./client/app/assets/less/main.less ./client/app/assets/less/ant.less

WARNING in ./client/app/visualizations/details/DetailsRenderer.jsx
Module Error (from ./node_modules/eslint-loader/index.js):

/home/jc/git_repos/redash/redash/client/app/visualizations/details/DetailsRenderer.jsx
  6:1  error  `antd/lib/pagination` import should occur before import of `@/visualizations`  import/order

✖ 1 problem (1 error, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.

 @ [\\\/.]test[\\.\/]).)*\.jsx?$ (./client/app/visualizations sync ^((?![\\\/.]test[\\.\/]).)*\.jsx?$) ./details/DetailsRenderer.jsx
 @ ./client/app/config/index.js
 @ ./client/app/index.js
 @ multi ./client/app/index.js ./client/app/assets/less/main.less ./client/app/assets/less/ant.less

WARNING in ./client/app/visualizations/sunburst/index.js
Module Error (from ./node_modules/eslint-loader/index.js):

/home/jc/git_repos/redash/redash/client/app/visualizations/sunburst/index.js
  3:1  error  `angular2react` import should occur before import of `@/lib/visualizations/sunburst`  import/order

✖ 1 problem (1 error, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.

 @ [\\\/.]test[\\.\/]).)*\.jsx?$ (./client/app/visualizations sync ^((?![\\\/.]test[\\.\/]).)*\.jsx?$) ./sunburst/index.js
 @ ./client/app/config/index.js
 @ ./client/app/index.js
 @ multi ./client/app/index.js ./client/app/assets/less/main.less ./client/app/assets/less/ant.less

WARNING in ./client/app/components/PreviewCard.jsx
Module Warning (from ./node_modules/eslint-loader/index.js):

/home/jc/git_repos/redash/redash/client/app/components/PreviewCard.jsx
  45:53  warning  'user.id' is missing in props validation        react/prop-types
  72:66  warning  'dataSource.id' is missing in props validation  react/prop-types

✖ 2 problems (0 errors, 2 warnings)

 @ [\\\/.]test[\\.\/]).)*\.jsx?$ (./client/app/components sync ^((?![\\\/.]test[\\.\/]).)*\.jsx?$) ./PreviewCard.jsx
 @ ./client/app/config/index.js
 @ ./client/app/index.js
 @ multi ./client/app/index.js ./client/app/assets/less/main.less ./client/app/assets/less/ant.less

WARNING in ./client/app/components/groups/GroupName.jsx
Module Warning (from ./node_modules/eslint-loader/index.js):

/home/jc/git_repos/redash/redash/client/app/components/groups/GroupName.jsx
  17:49  warning  'group.type' is missing in props validation  react/prop-types

✖ 1 problem (0 errors, 1 warning)

 @ [\\\/.]test[\\.\/]).)*\.jsx?$ (./client/app/components sync ^((?![\\\/.]test[\\.\/]).)*\.jsx?$) ./groups/GroupName.jsx
 @ ./client/app/config/index.js
 @ ./client/app/index.js
 @ multi ./client/app/index.js ./client/app/assets/less/main.less ./client/app/assets/less/ant.less

ERROR in ./client/app/components/TimeAgo.jsx
Module Error (from ./node_modules/eslint-loader/index.js):

/home/jc/git_repos/redash/redash/client/app/components/TimeAgo.jsx
  9:1  error  `antd/lib/tooltip` import should occur before import of `@/components/proptypes`  import/order

✖ 1 problem (1 error, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.

 @ ./client/app/pages/admin/OutdatedQueries.jsx 33:0-47 155:51-58
 @ ./client/app/pages sync ^((?![\\\/.]test[\\.\/]).)*\.jsx?$
 @ ./client/app/config/index.js
 @ ./client/app/index.js
 @ multi ./client/app/index.js ./client/app/assets/less/main.less ./client/app/assets/less/ant.less

ERROR in ./client/app/config/index.js
Module Error (from ./node_modules/eslint-loader/index.js):

/home/jc/git_repos/redash/redash/client/app/config/index.js
  33:1  error  `moment` import should occur before import of `@/components/DialogWrapper`  import/order

✖ 1 problem (1 error, 0 warnings)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Django import order causing error with default user model on ...
Until I tried to import models from another django app into my overridden custom user model app I had never seen this error....
Read more >
Refactor the importing order of imports in the project files - ScholarX ...
The rule of thumb is to keep the import order like this: Built-in; External; Internal ... github.com/sef-global/scholarx-frontend ...
Read more >
Enforce a convention in module import order - Gitlab @ CCI
A way to get location (latitude and longitude), elevation, speed and other relevant data from individual satellites from the Starlink ...
Read more >
Sorting your imports correctly in React - DEV Community ‍ ‍
ESLint comes with an in-built import sorting rules that even they have beneficial properties, it doesn't fit what I need.
Read more >
How to Build a Micro Frontend with Webpack's Module ... - Bitovi
The library property has its own set of configuration options that include name and type. Type is the type of library that can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found