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

Updates for Nodebb V2 #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Ishankhan21
Copy link

@Ishankhan21 Ishankhan21 commented Aug 17, 2022

@Ishankhan21 Ishankhan21 changed the title Updated for Nodebb V2 Updates for Nodebb V2 Aug 17, 2022
@Ishankhan21
Copy link
Author

Hey @mooreds, Please review.

@mooreds
Copy link

mooreds commented Aug 22, 2022

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.

@mooreds
Copy link

mooreds commented Sep 2, 2022

I haven't forgotten about this, but sorry, have been slammed and unable to test.

@Quintasan
Copy link

@mooreds I manually imported the changes here to my NodeBB installation and they worked if this helps

@mooreds
Copy link

mooreds commented Oct 11, 2022

Taking a look at this now, sorry for the delay.

"static/lib/admin.js"
]
"nbbpm": {
"compatibility": "^2.0.0"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this mean that it is only compatible with 2.0.0 and above? I tested and it seems to work with 1.18 too.

@mooreds
Copy link

mooreds commented Oct 12, 2022

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?

@cbjpdev
Copy link

cbjpdev commented Mar 14, 2023

Any update on this? Can we like have a different versions for nodebb 1.18 and 2.x.

@Quintasan
Copy link

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

@Quintasan
Copy link

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.

@julianlam
Copy link

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

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 this pull request may close these issues.

5 participants