Open Ishankhan21 opened 1 year ago
Hey @mooreds, Please review.
Thanks for the reminder. I'm going to try to review this week. I need to test against both nodebb 2 and nodebb 1.8 before accepting.
I haven't forgotten about this, but sorry, have been slammed and unable to test.
@mooreds I manually imported the changes here to my NodeBB installation and they worked if this helps
Taking a look at this now, sorry for the delay.
Heya, I'm having trouble building this for my 1.18 installation. I'd love to see if we can support both 2.x and 1.18.
When I check out your branch Ishankhan21:nodebb-v2-upgrade
and then run npm link
inside the plugin directory, I get this error message:
[ec2-user@ip-172-31-14-85 nodebb-plugin-fusionauth-oidc]$ npm link
npm ERR! code 2
npm ERR! path /home/ec2-user/nodebb/node_modules/nodebb-plugin-fusionauth-oidc
npm ERR! command failed
npm ERR! command sh -c -- npx tsc src/*.ts
npm ERR! ../@types/whatwg-url/index.d.ts(73,43): error TS1005: ',' expected.
npm ERR! ../@types/whatwg-url/index.d.ts(73,66): error TS1005: ')' expected.
npm ERR! ../@types/whatwg-url/index.d.ts(73,67): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
npm ERR! ../@types/whatwg-url/index.d.ts(74,13): error TS1109: Expression expected.
I'm using 3.9.10 of tsc:
$ npx tsc --version
Version 3.9.10
Is this because nodebb 1.18 doesn't support that version of typescript or for some other reason?
Any update on this? Can we like have a different versions for nodebb 1.18 and 2.x.
@mooreds Do you think we can perhaps move on from v1 series of NodeBB with this? 3.1.4 was released last month and I don't think v1 series are supported anymore.
I just tested this on 1.18 and it works as well. Regarding npm link
- I never did any NodeBB development so running the command above yielded
npm link
npm ERR! code 1
npm ERR! path /tmp/nodebb-plugin-fusionauth-oidc
npm ERR! command failed
npm ERR! command sh -c npx tsc src/*.ts
npm ERR!
npm ERR! This is not the tsc command you are looking for
npm ERR!
npm ERR!
npm ERR! To get access to the TypeScript compiler, tsc, from the command line either:
npm ERR!
npm ERR! - Use npm install typescript to first add TypeScript to your project before using npx
npm ERR! - Use yarn to avoid accidentally running code from un-installed packages
npm ERR! A complete log of this run can be found in:
npm ERR! /home/quintasan/.npm/_logs/2023-06-05T23_16_15_159Z-debug-0.log
After I did npm install typescript
it passed without any errors:
nodebb-plugin-fusionauth-oidc on nodebb-v2-upgrade [!] is 📦 v1.0.4 via v18.16.0
❯ npm link
up to date, audited 3 packages in 3s
found 0 vulnerabilities
Reshimming asdf nodejs...
I'm going to attempt to install this in 3.1.4 and see what happens.
@mooreds the compatibility string is just a hint. If the range specified doesn't encompass v1.18 then it will not show up in the plugin list in the ACP but is of course still installable via command line.