NicolasSiver / nodebb-plugin-ns-awards

A system for rewarding forum users. The plugin allows admin to define set of awards that could be granted to users for special accomplishments.
https://community.nodebb.org/topic/4397/nodebb-plugin-ns-awards-ns-awards-give-medals
MIT License
31 stars 24 forks source link

where is the award setting? #27

Closed donqq closed 5 years ago

donqq commented 5 years ago

I can't find it anywhere in admin panel. I rebuilt, restarted both but still no avail.

donqq commented 5 years ago

I searched and navigated to the setting, then it shows this message "Not Found You seem to have stumbled upon a page that does not exist. Return to the home page."

NicolasSiver commented 5 years ago

Hello,

Are you checking on 1.12.0? It could be related to compatibility issues. When you start NodeBB, do you see any warnings related to Awards plugin?

donqq commented 5 years ago

yeah on the latest version. I just don't see it in the admin panel. I don't see any warnings or errors apart from the one I posted above.

donqq commented 5 years ago

is there a solution for this problem?

donqq commented 5 years ago

while checking the log file I saw this.

2019-04-14T20:28:57.017Z [4567/19223] - warn: [deprecated] requiring core modules with module.parent.require('./src/emitter') is deprecated. Please use require.main.require("./src/<module_name>") instead. at /home/user/nodebb/node_modules/nodebb-plugin-ns-awards/plugin/nodebb.js:7:31


2019-04-14T20:28:57.020Z [4567/19223] - error: Error: Cannot find module './src/emitter' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15) at Function.Module._load (internal/modules/cjs/loader.js:508:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Module.require.main.require (/home/user/nodebb/require-main.js:8:10) at /home/user/nodebb/node_modules/nodebb-plugin-ns-awards/plugin/nodebb.js:7:31 at Object. (/home/user/nodebb/node_modules/nodebb-plugin-ns-awards/plugin/nodebb.js:42:3) at Module._compile (internal/modules/cjs/loader.js:701:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) at Module.load (internal/modules/cjs/loader.js:600:32)


2019-04-14T20:28:57.022Z [4567/19223] - warn: [plugins] Unable to parse library for: nodebb-plugin-ns-awards

Edit: As the information for people who have the same issue, issue is not fixed, but author closed the issue.

songkeys commented 4 years ago

I have the same issue. I'm on nodebb 1.13.1. why is this closed?

2019-12-30T08:31:14.043Z [4567/385] - ^[[33mwarn^[[39m: [deprecated] requiring core modules with `module.parent.require('./src/emitter'
Require stack:
- /root/nodebb/require-main.js
- /root/nodebb/app.js)` is deprecated. Please use `require.main.require("./src/<module_name>")` instead.
    at /root/nodebb/node_modules/nodebb-plugin-ns-awards/plugin/nodebb.js:7:31
2019-12-30T08:31:14.043Z [4567/385] - ^[[33mwarn^[[39m: [plugins] Unable to parse library for: nodebb-plugin-ns-awards
2019-12-30T08:31:14.043Z [4567/385] - ^[[31merror^[[39m: Error: Cannot find module './src/emitter'
Require stack:
- /root/nodebb/require-main.js
- /root/nodebb/app.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:17)
    at Function.Module._load (internal/modules/cjs/loader.js:859:27)
    at Module.require (internal/modules/cjs/loader.js:1028:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Module.require.main.require (/root/nodebb/require-main.js:8:10)
    at /root/nodebb/node_modules/nodebb-plugin-ns-awards/plugin/nodebb.js:7:31
    at Object.<anonymous> (/root/nodebb/node_modules/nodebb-plugin-ns-awards/plugin/nodebb.js:42:3)
    at Module._compile (internal/modules/cjs/loader.js:1139:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1159:10)
    at Module.load (internal/modules/cjs/loader.js:988:32)
songkeys commented 4 years ago

This might be helpful:

https://github.com/NicolasSiver/nodebb-plugin-ns-embed/pull/13

oplik0 commented 4 years ago

Are you sure you're using the latest version of the plugin? Can you check how does your plugin/nodebb.js look like? Because that issue was resolved here as well: https://github.com/NicolasSiver/nodebb-plugin-ns-awards/commit/3953ea555060aabc46427cf89e5401074927a1e3

If there is a mention of emitter somewhere then for some reason you got an older version that tries to import a module that was removed from NodeBB core

songkeys commented 4 years ago

Thanks. I've re-checked my version. It's ^4.0.0.

I installed it from the Admin Panel. The latest there is 4.0.0. But it's a older version obviously...

Why hasn't it been updated?

oplik0 commented 4 years ago

It has been, actually. But nbbpm compatibility is wrong: https://github.com/NicolasSiver/nodebb-plugin-ns-awards/blob/ebfbfbff179e72a7d5a6da26edc3768235463f8f/package.json#L34

New version are only shown as compatible with NodeBB 1.12.x (~1.12.0 means >=1.12.0 and <1.13.0)

Just install it with npm install nodebb-plugin-ns-awards to fix the problem

songkeys commented 4 years ago

Thanks. @oplik0 . Maybe it's indeed imcapatible with nodebb >=1.13.0. Now I upgrade it to 5.2.0, and I got some 502 error for some requests:

image

I'll open another issue if neccessary.