nteract / commuter

🚎 Notebook sharing hub

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: "r is undefined"

taniki opened this issue · comments

I have this javascript error on the current master.

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

https://scope.11d.im

Hello @taniki! Thanks for opening this issue.

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

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 :)

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".

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!

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

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.

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.

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