fraction / oasis

Free, open-source, peer-to-peer social application that helps you follow friends and discover new ones on Secure Scuttlebutt (SSB).
http://oasis-demo.fraction.io
GNU Affero General Public License v3.0
286 stars 42 forks source link

Various breakage under Node 16. #688

Open jaccarmac opened 3 years ago

jaccarmac commented 3 years ago

After updating my Node, I realized theming wasn't working. The display problems seem to be broader than that, however.

  1. Switching themes has no effect. The background color is pure white and the CSS seems generally broken, though I haven't looked for specifics.
  2. It is impossible to select any part of the text of a post.
  3. The index bars on the settings page are blank.

There appears to be a single error generated for each page reload

TypeError: Cannot read property 'getFileName' of undefined
    at module.exports (/home/jaccarmac/local/n/lib/node_modules/@fraction/oasis/node_modules/caller-path/index.js:4:40)
    at requireStyle (/home/jaccarmac/local/n/lib/node_modules/@fraction/oasis/node_modules/require-style/index.js:17:22)
    at /home/jaccarmac/local/n/lib/node_modules/@fraction/oasis/src/index.js:546:16
    at dispatch (/home/jaccarmac/local/n/lib/node_modules/@fraction/oasis/node_modules/koa-compose/index.js:42:32)
    at /home/jaccarmac/local/n/lib/node_modules/@fraction/oasis/node_modules/@koa/router/lib/router.js:372:16
    at dispatch (/home/jaccarmac/local/n/lib/node_modules/@fraction/oasis/node_modules/koa-compose/index.js:42:32)
    at /home/jaccarmac/local/n/lib/node_modules/@fraction/oasis/node_modules/koa-compose/index.js:34:12
    at dispatch (/home/jaccarmac/local/n/lib/node_modules/@fraction/oasis/node_modules/@koa/router/lib/router.js:377:31)
    at dispatch (/home/jaccarmac/local/n/lib/node_modules/@fraction/oasis/node_modules/koa-compose/index.js:42:32)
    at middleware (/home/jaccarmac/local/n/lib/node_modules/@fraction/oasis/src/index.js:1049:13)

I wanted to see if regenerating my indexes would help, but that option appears to be gone, even when switching back to Node 15.

gitbenb commented 3 years ago

Getting the same over here I do see the regenerate index button and it does re-index well. but after that the issue remains, the errors keeps being generated at each page refresh I can confirm your 3 points of error tho

gitbenb commented 3 years ago

What would be the ideal Node version to use with the current code, so to avoid those errors ? edit : using NVM, I tested this and it seems Node 15.14.0 is just fine, I see no errors, theme is working image

jaccarmac commented 3 years ago

I've seen similar issues in other projects after switching to 16. So I expect this is a backward-incompatible change that people haven't prepped for yet. I haven't done the digging myself yet, or I would offer a patch.

In this case, the README suggests using the current version of Node, though, and it appears that 15 is getting phased out at the end of this month.