Skip to content

Plugin Install Error

Solved Customisation
6 2 2.9k 1
  • wrote on last edited by
    #1

    Hi, I have had trouble installing nodebb-plugin-discord-notification. In the last days i could not install at all. I rolled back my machine and today managed to install with this output.

    smiley@fmjcod4:~$ cd /home/smiley/nodebb
    smiley@fmjcod4:~/nodebb$ npm install nodebb-plugin-discord-notification
    npm WARN deprecated discord.js@12.5.3: no longer supported
    npm WARN @apidevtools/swagger-parser@10.0.3 requires a peer of openapi-types@>=7 but none is installed. You must install peer dependencies yourself.
    npm WARN bootbox@5.5.3 requires a peer of popper.js@^1.16.0 but none is installed. You must install peer dependencies yourself.
    npm WARN cosmiconfig-typescript-loader@2.0.2 requires a peer of cosmiconfig@>=7 but none is installed. You must install peer dependencies yourself.
    npm WARN textcomplete.contenteditable@0.1.1 requires a peer of textcomplete@^0.14.2 but none is installed. You must install peer dependencies yourself.
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x6                                                   4"})
    
    + nodebb-plugin-discord-notification@1.5.0
    added 14 packages from 15 contributors and audited 1336 packages in 8.728s
    
    148 packages are looking for funding
      run `npm fund` for details
    
    found 3 vulnerabilities (1 moderate, 2 high)
      run `npm audit fix` to fix them, or `npm audit` for details
    smiley@fmjcod4:~/nodebb$
    

    I activated the plugin and restarted/rebuilt and now I have this. Any ideas what could be wrong? I am sure I have had this working previously on an older versions of NodeBB. Others on the forum say that it works OK on the latest version so I am not sure. Thanks as always.

    discorderror.png

  • @phenomlab Only see this… I think right after it was installed.

    2022-07-25T09:20:29.220Z [4567/85247] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
    2022-07-25T09:20:29.224Z [4567/85247] - info: [app] Web server closed to connections.
    2022-07-25T09:20:29.229Z [4567/85247] - info: [app] Live analytics saved.
    2022-07-25T09:20:29.236Z [4567/85247] - info: [app] Database connection closed.
    2022-07-25T09:20:29.236Z [4567/85247] - info: [app] Shutdown complete.
    [cluster] Child Process (85247) has exited (code: 0, signal: null)
    2022-07-25T09:20:29.479Z [4567/85332] - info: Initializing NodeBB v2.2.5 https://forum.fmjcod4.com
    2022-07-25T09:20:30.760Z [4567/85332] - info: [socket.io] Restricting access to origin: https://forum.fmjcod4.com:*
    2022-07-25T09:20:30.959Z [4567/85332] - warn:    [plugins/nodebb-plugin-discord-notification] The plugin.json field "library" is deprecated. Please use the package.json field "main" instead.
    2022-07-25T09:20:30.959Z [4567/85332] - warn: [plugins] Unable to load library for: nodebb-plugin-discord-notification
    2022-07-25T09:20:30.960Z [4567/85332] - error: ReferenceError: define is not defined
        at Object.<anonymous> (/home/smiley/nodebb/public/src/modules/translator.js:5:1)
        at Module._compile (internal/modules/cjs/loader.js:1085:14)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
        at Module.load (internal/modules/cjs/loader.js:950:32)
        at Function.Module._load (internal/modules/cjs/loader.js:790:14)
        at Module.require (internal/modules/cjs/loader.js:974:19)
        at require (internal/modules/cjs/helpers.js:92:18)
        at Module.require.main.require (/home/smiley/nodebb/require-main.js:8:10)
        at /home/smiley/nodebb/node_modules/nodebb-plugin-discord-notification/library.js:7:32
        at Object.<anonymous> (/home/smiley/nodebb/node_modules/nodebb-plugin-discord-notification/library.js:123:2)
    
    2022-07-25T09:20:30.960Z [4567/85332] - warn: [plugins/load] The following plugins may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing. In the event of an unresponsive NodeBB caused by this plugin, run `./nodebb reset -p PLUGINNAME` to disable it.
      * nodebb-rewards-essentials
      * nodebb-plugin-dbsearch
      * nodebb-plugin-custom-pages
      * nodebb-plugin-cards
      * nodebb-plugin-soundpack-default
      * nodebb-plugin-recent-cards
      * nodebb-plugin-youtube-embed
      * nodebb-plugin-discord-notification
    
    wrote on last edited by
    #4

    @Sampo2910 Looks like the plugin in the NodeBB NPM repository is broken. There is a workaround though in the sense that you can install it from github directly.

    First, completely uninstall the version you installed from npm via the command line, so

    npm remove nodebb-plugin-discord-notification
    

    Then

    npm install git+https://github.com/amargon/nodebb-plugin-discord-notification
    

    Rebuild, restart, and then it should work

    17973bb7-91ab-42bb-98f8-633b1ded36c7-image.png

  • Hi, I have had trouble installing nodebb-plugin-discord-notification. In the last days i could not install at all. I rolled back my machine and today managed to install with this output.

    smiley@fmjcod4:~$ cd /home/smiley/nodebb
    smiley@fmjcod4:~/nodebb$ npm install nodebb-plugin-discord-notification
    npm WARN deprecated discord.js@12.5.3: no longer supported
    npm WARN @apidevtools/swagger-parser@10.0.3 requires a peer of openapi-types@>=7 but none is installed. You must install peer dependencies yourself.
    npm WARN bootbox@5.5.3 requires a peer of popper.js@^1.16.0 but none is installed. You must install peer dependencies yourself.
    npm WARN cosmiconfig-typescript-loader@2.0.2 requires a peer of cosmiconfig@>=7 but none is installed. You must install peer dependencies yourself.
    npm WARN textcomplete.contenteditable@0.1.1 requires a peer of textcomplete@^0.14.2 but none is installed. You must install peer dependencies yourself.
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x6                                                   4"})
    
    + nodebb-plugin-discord-notification@1.5.0
    added 14 packages from 15 contributors and audited 1336 packages in 8.728s
    
    148 packages are looking for funding
      run `npm fund` for details
    
    found 3 vulnerabilities (1 moderate, 2 high)
      run `npm audit fix` to fix them, or `npm audit` for details
    smiley@fmjcod4:~/nodebb$
    

    I activated the plugin and restarted/rebuilt and now I have this. Any ideas what could be wrong? I am sure I have had this working previously on an older versions of NodeBB. Others on the forum say that it works OK on the latest version so I am not sure. Thanks as always.

    discorderror.png

    wrote on last edited by
    #2

    @Sampo2910 Anything in the logs ?

  • @Sampo2910 Anything in the logs ?

    wrote on last edited by
    #3

    @phenomlab Only see this… I think right after it was installed.

    2022-07-25T09:20:29.220Z [4567/85247] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
    2022-07-25T09:20:29.224Z [4567/85247] - info: [app] Web server closed to connections.
    2022-07-25T09:20:29.229Z [4567/85247] - info: [app] Live analytics saved.
    2022-07-25T09:20:29.236Z [4567/85247] - info: [app] Database connection closed.
    2022-07-25T09:20:29.236Z [4567/85247] - info: [app] Shutdown complete.
    [cluster] Child Process (85247) has exited (code: 0, signal: null)
    2022-07-25T09:20:29.479Z [4567/85332] - info: Initializing NodeBB v2.2.5 https://forum.fmjcod4.com
    2022-07-25T09:20:30.760Z [4567/85332] - info: [socket.io] Restricting access to origin: https://forum.fmjcod4.com:*
    2022-07-25T09:20:30.959Z [4567/85332] - warn:    [plugins/nodebb-plugin-discord-notification] The plugin.json field "library" is deprecated. Please use the package.json field "main" instead.
    2022-07-25T09:20:30.959Z [4567/85332] - warn: [plugins] Unable to load library for: nodebb-plugin-discord-notification
    2022-07-25T09:20:30.960Z [4567/85332] - error: ReferenceError: define is not defined
        at Object.<anonymous> (/home/smiley/nodebb/public/src/modules/translator.js:5:1)
        at Module._compile (internal/modules/cjs/loader.js:1085:14)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
        at Module.load (internal/modules/cjs/loader.js:950:32)
        at Function.Module._load (internal/modules/cjs/loader.js:790:14)
        at Module.require (internal/modules/cjs/loader.js:974:19)
        at require (internal/modules/cjs/helpers.js:92:18)
        at Module.require.main.require (/home/smiley/nodebb/require-main.js:8:10)
        at /home/smiley/nodebb/node_modules/nodebb-plugin-discord-notification/library.js:7:32
        at Object.<anonymous> (/home/smiley/nodebb/node_modules/nodebb-plugin-discord-notification/library.js:123:2)
    
    2022-07-25T09:20:30.960Z [4567/85332] - warn: [plugins/load] The following plugins may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing. In the event of an unresponsive NodeBB caused by this plugin, run `./nodebb reset -p PLUGINNAME` to disable it.
      * nodebb-rewards-essentials
      * nodebb-plugin-dbsearch
      * nodebb-plugin-custom-pages
      * nodebb-plugin-cards
      * nodebb-plugin-soundpack-default
      * nodebb-plugin-recent-cards
      * nodebb-plugin-youtube-embed
      * nodebb-plugin-discord-notification
    
  • @phenomlab Only see this… I think right after it was installed.

    2022-07-25T09:20:29.220Z [4567/85247] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
    2022-07-25T09:20:29.224Z [4567/85247] - info: [app] Web server closed to connections.
    2022-07-25T09:20:29.229Z [4567/85247] - info: [app] Live analytics saved.
    2022-07-25T09:20:29.236Z [4567/85247] - info: [app] Database connection closed.
    2022-07-25T09:20:29.236Z [4567/85247] - info: [app] Shutdown complete.
    [cluster] Child Process (85247) has exited (code: 0, signal: null)
    2022-07-25T09:20:29.479Z [4567/85332] - info: Initializing NodeBB v2.2.5 https://forum.fmjcod4.com
    2022-07-25T09:20:30.760Z [4567/85332] - info: [socket.io] Restricting access to origin: https://forum.fmjcod4.com:*
    2022-07-25T09:20:30.959Z [4567/85332] - warn:    [plugins/nodebb-plugin-discord-notification] The plugin.json field "library" is deprecated. Please use the package.json field "main" instead.
    2022-07-25T09:20:30.959Z [4567/85332] - warn: [plugins] Unable to load library for: nodebb-plugin-discord-notification
    2022-07-25T09:20:30.960Z [4567/85332] - error: ReferenceError: define is not defined
        at Object.<anonymous> (/home/smiley/nodebb/public/src/modules/translator.js:5:1)
        at Module._compile (internal/modules/cjs/loader.js:1085:14)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
        at Module.load (internal/modules/cjs/loader.js:950:32)
        at Function.Module._load (internal/modules/cjs/loader.js:790:14)
        at Module.require (internal/modules/cjs/loader.js:974:19)
        at require (internal/modules/cjs/helpers.js:92:18)
        at Module.require.main.require (/home/smiley/nodebb/require-main.js:8:10)
        at /home/smiley/nodebb/node_modules/nodebb-plugin-discord-notification/library.js:7:32
        at Object.<anonymous> (/home/smiley/nodebb/node_modules/nodebb-plugin-discord-notification/library.js:123:2)
    
    2022-07-25T09:20:30.960Z [4567/85332] - warn: [plugins/load] The following plugins may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing. In the event of an unresponsive NodeBB caused by this plugin, run `./nodebb reset -p PLUGINNAME` to disable it.
      * nodebb-rewards-essentials
      * nodebb-plugin-dbsearch
      * nodebb-plugin-custom-pages
      * nodebb-plugin-cards
      * nodebb-plugin-soundpack-default
      * nodebb-plugin-recent-cards
      * nodebb-plugin-youtube-embed
      * nodebb-plugin-discord-notification
    
    wrote on last edited by
    #4

    @Sampo2910 Looks like the plugin in the NodeBB NPM repository is broken. There is a workaround though in the sense that you can install it from github directly.

    First, completely uninstall the version you installed from npm via the command line, so

    npm remove nodebb-plugin-discord-notification
    

    Then

    npm install git+https://github.com/amargon/nodebb-plugin-discord-notification
    

    Rebuild, restart, and then it should work

    17973bb7-91ab-42bb-98f8-633b1ded36c7-image.png

  • phenomlab phenomlab has marked this topic as solved on
  • @Sampo2910 Looks like the plugin in the NodeBB NPM repository is broken. There is a workaround though in the sense that you can install it from github directly.

    First, completely uninstall the version you installed from npm via the command line, so

    npm remove nodebb-plugin-discord-notification
    

    Then

    npm install git+https://github.com/amargon/nodebb-plugin-discord-notification
    

    Rebuild, restart, and then it should work

    17973bb7-91ab-42bb-98f8-633b1ded36c7-image.png

    wrote on last edited by
    #5

    @phenomlab said in Plugin Install Error:

    npm install git+https://github.com/amargon/nodebb-plugin-discord-notification

    PERFECT!!

    Brilliant Mark. Worked a treat. Quick answer and a wealth of knowledge. Appreciate it a lot!!.

  • @phenomlab said in Plugin Install Error:

    npm install git+https://github.com/amargon/nodebb-plugin-discord-notification

    PERFECT!!

    Brilliant Mark. Worked a treat. Quick answer and a wealth of knowledge. Appreciate it a lot!!.

    wrote on last edited by phenomlab
    #6

    @Sampo2910 no problems. Happy to help. Just remember that this particular method isn’t the best in the sense that it may not get update notifications. The general recommendation here would be to move back to the official npm repo as soon as the GitHub version has been merged.

    For the meantime, it’ll work fine though.


Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee ☕
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics
  • nodebb-plugin-custom-pages

    Solved Customisation plugin custom-pages
    5
    2
    3 Votes
    5 Posts
    5k Views
    phenomlab
    @DownPW it’s possible, yes, but you may inadvertently end up targeting other elements using the same class which of course isn’t desired. Can you provide a link in DM for me to review?
  • Plugin to show images in teasers

    General nodebb teaser image plugin hook
    6
    1
    2 Votes
    6 Posts
    2k Views
    phenomlab
    @dave1904 I’d start by adding a console.log function to hookData so you can see what is being returned return hookData; console.log(hookData):
  • How to downgrade plugin version on NodeBB

    Solved Customisation downgrade nodebb
    11
    3 Votes
    11 Posts
    4k Views
    phenomlab
    @cagatay no problems
  • Embed - What Are You Using?

    Solved General customisation plugin
    13
    3 Votes
    13 Posts
    4k Views
    phenomlab
    @DownPW Hmm - it’ll work with iFramely (locally hosted), or you can use the below string to embed using https://community.nodebb.org/topic/7135/nodebb-plugin-ns-embed-ns-embed/114 Watch (?:<a.*?)?(?:https?:\/\/)?(?:www\.)?dailymotion\.com\/video\/([a-zA-Z0-9_-]{4,11})(?:.*?\/a>)? Replace <div class='embed-wrapper'><div class='embed-container'><iframe src='//www.dailymotion.com/embed/video/$1' frameborder='0' allowfullscreen></iframe></div></div> [image: 4f5f13f7-0c73-460e-b32f-f974f170b236-image.png]
  • Error install plugin

    Solved Customisation plugin nodebb
    8
    1
    1 Votes
    8 Posts
    6k Views
    DownPW
    @pobojmoks Not WP plugin but nodeBB but it a known bug
  • Recent Cards plugin customization

    Solved Customisation nodebb
    21
    1
    13 Votes
    21 Posts
    12k Views
    phenomlab
    @pobojmoks that’s easily done by modifying the code provided here so that it targets background rather than border In essence, the below should work $(document).ready(function() { $(window).on('action:ajaxify.end', function(data) { $('.recent-card-container').each(function(i) { var dataId = $(this).attr("data-cid"); var color = $('[role="presentation"]', this).css("background-color"); console.log("data-cid " + dataId + " is " + color); $('[data-cid="' + dataId + '"] .recent-card').attr("style", "background-color: " + color); }); }); });
  • 3 Votes
    6 Posts
    4k Views
    DownPW
    @phenomlab haha!! You are crazy. In a good way, of course It’s a way of saying you’re awesome !
  • Cannot read property 'config' of undefined

    Solved Configure
    1
    0 Votes
    1 Posts
    945 Views
    No one has replied