Skip to content
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

TypeError: "r is undefined" #254

Closed
taniki opened this issue Mar 6, 2019 · 8 comments · Fixed by #266
Closed

TypeError: "r is undefined" #254

taniki opened this issue Mar 6, 2019 · 8 comments · Fixed by #266

Comments

@taniki
Copy link
Contributor

taniki commented Mar 6, 2019

I have this javascript error on the current master.

$ yarn
$ yarn build:all
$ ./bin.js

https://scope.11d.im

@captainsafia
Copy link
Member

Hello @taniki! Thanks for opening this issue.

I'm unable to reproduce this issue locally. Can you provide more information about your set up?

@taniki
Copy link
Contributor Author

taniki commented May 3, 2019

I have tried on a local ubuntu computer with current lts of node and inside a docker container running node:10 (e.g. https://github.com/etalab/autopsy/blob/master/commuter/Dockerfile).

I remember having the same the error using various ways to start the service but I might have missed the right one :)

@guzmud
Copy link

guzmud commented Jul 1, 2019

Hi, I'm having a similar issue, so in case more info can be of use for debug :

  • inside a Ubuntu 16.04.4 LTS container
  • using https://deb.nodesource.com/setup_12.x as a source for nodejs (same goes with setup_11.x, setup_10.x and setup_8.x)
  • using https://dl.yarnpkg.com/debian/ stable main as a source for yarn
  • installing both using apt then using yarn to install commuter (which seems to be in v 5.8.0)
  • running commuter through supervisor simply using "commuter" (linked to /usr/local/bin/commuter, a node script looking for "./lib/index.js")

Edit 1 : TypeError "r is undefined" seems to come from the main-[hexastuff].js line 10 and from the commons.[hexastuff].js line 22. Could it be a packing issue ?

TypeError: "r is undefined" // NextJS 51 // commons.bc046491bc29baa15cde.js:22:74987
TypeError: "r is undefined" // NextJS 51 // commons.bc046491bc29baa15cde.js:22:74987
TypeError: "r is undefined" // NextJS 51 // main-99e5dec5b0064114265c.js:10:7496

Edit 2 : when yarn-ing commuter, there seems to be issues around the core-js version (requiring 1.2.7, unmaintained), and the "fsevents@1.2.9" module incompatible with linux, plus a bunch of warnings regarding unmet dependencies (styked-jsx, immutable, styled-jsx, vega). Requirements management during packaging or something?

warning @nteract/commuter > @nteract/presentational-components > @blueprintjs/core > react-popper > create-react-context > fbjs > core-js@1.2.7: core-js@<2.6.8 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.

warning "@nteract/commuter > @nteract/notebook-preview@11.0.0-alpha.0" has unmet peer dependency "immutable@^4.0.0-rc.9".
warning "@nteract/commuter > @nteract/notebook-preview@11.0.0-alpha.0" has unmet peer dependency "styled-jsx@^3.1.0".
warning "@nteract/commuter > @nteract/presentational-components@2.0.0-alpha.0" has unmet peer dependency "styled-jsx@^3.1.0".
warning "@nteract/commuter > @nteract/transform-vega > vega-embed > vega-themes@2.3.0" has unmet peer dependency "vega@*".
warning "@nteract/commuter > @nteract/transform-vega > vega-embed > vega-lite@2.7.0" has unmet peer dependency "vega@^3.0.0 || ^4.0.0".

@captainsafia
Copy link
Member

Thanks for posting the additional details!

I was able to track down roughly where the error is bubbling up from. It is bubbling up via our styled-jsx dependency in the pages/view.js file but I'm not sure what is causing it at the moment. Will take a look at this at some point when I have time.

If either of you are able to find any leads on what might be going on based on the breadcrumb above, feel free to submit a PR!

@guzmud
Copy link

guzmud commented Jul 10, 2019

Glad I could help, though js ain't my thing so I just leave it here, sorry ! Gl Hf.

@taniki
Copy link
Contributor Author

taniki commented Jul 10, 2019

Something is going wrong between the server side rendering and the brower rendering of browse-header.js and header.js. I am not acquainted to react and this is also seems to be related to previous version of next.

@taniki
Copy link
Contributor Author

taniki commented Jul 11, 2019

Somehow I maked it work by upgrading the full stack with an yarn upgrade --latest and cleaning some legacy code while digging next 9 documentation. I don't know if it will be useful to propose a PR with a random migration from next 7 to last release.

@captainsafia
Copy link
Member

Closing now that @taniki's pull request has been merged. Thanks all!

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

Successfully merging a pull request may close this issue.

3 participants