Problem with a saas instance when installing a plugin (spawn yarn NOENT)

Solved Technical Support
  • Hi 🙂
    I spinned a trial community and I was playing with it. When trying to deploy a plugin (any, like iframely), I constantly have this error (spawn yarn NOENT):
    cdf9cd5d-3c04-41c7-8818-55ad67b213ab-image.png

    In the console log I see:

    2023-09-15T04:24:55.234Z [4567/2178] - error: admin.plugins.toggleInstall
    Error: spawn yarn ENOENT
        at ChildProcess._handle.onexit (node:internal/child_process:283:19)
        at onErrorNT (node:internal/child_process:476:16)
        at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
    

    It's almost as for some reason it's trying to use yarn rather than npm to deploy the plugin (?) ❓

  • @Lmame ah, sorry about that! We'll get that fixed up for you.

  • @Lmame Good to go, can you try again?

    We changed the way we deployed NodeBB Instances so that npm was used again (we were initially using yarn, but we just removed it completely now)

  • @julian said in Problem with a saas instance when installing a plugin (spawn yarn NOENT):

    @Lmame Good to go, can you try again?

    We changed the way we deployed NodeBB Instances so that npm was used again (we were initially using yarn, but we just removed it completely now)

    Thanks a lot!
    I managed to install a 3 or 4 plugins from the "trending" tab (without hitting build and restart, I activated the first one, but did not build / restart, I was waiting to install all of them to activate them and then doing a build and restart), but then when I tried to install one from the "find" tab (around the last ones, I can't remember the name), I had this error:
    0864a1b0-a6ee-4f11-b548-42b8c98e538f-image.png

    Then when I tried to navigate back to the plugins, the list was empty:
    5b59ac92-6548-4291-b6d6-46eb75fbdec5-image.png

    I saw this in the logs:

    2023-09-15T07:34:07.486Z [4567/3649] - error: admin.plugins.toggleInstall
    TypeError: Invalid Version: 3.2.00001
        at new SemVer (/home/saas/nodebb/node_modules/semver/classes/semver.js:38:13)
        at compare (/home/saas/nodebb/node_modules/semver/functions/compare.js:3:32)
        at Object.gt (/home/saas/nodebb/node_modules/semver/functions/gt.js:2:29)
        at /home/saas/nodebb/src/plugins/index.js:232:42
        at Array.forEach (<anonymous>)
        at Plugins.normalise (/home/saas/nodebb/src/plugins/index.js:204:19)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
        at async Plugins.get (/home/saas/nodebb/src/plugins/index.js:160:19)
        at async toggleInstall (/home/saas/nodebb/src/plugins/install.js:116:22)
        at async Plugins.toggleInstall (/home/saas/nodebb/src/plugins/install.js:101:10)
    2023-09-15T07:36:33.080Z [4567/3649] - error: Error loading https://packages.nodebb.org/api/v1/plugins?version=3.4.2 Invalid Version: 3.2.00001 {"stack":"TypeError: Invalid Version: 3.2.00001\n    at new SemVer (/home/saas/nodebb/node_modules/semver/classes/semver.js:38:13)\n    at compare (/home/saas/nodebb/node_modules/semver/functions/compare.js:3:32)\n    at Object.gt (/home/saas/nodebb/node_modules/semver/functions/gt.js:2:29)\n    at /home/saas/nodebb/src/plugins/index.js:232:42\n    at Array.forEach (<anonymous>)\n    at Plugins.normalise (/home/saas/nodebb/src/plugins/index.js:204:19)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Plugins.list (/home/saas/nodebb/src/plugins/index.js:175:10)\n    at async getPlugins (/home/saas/nodebb/src/controllers/admin/plugins.js:63:23)\n    at async getCompatiblePlugins (/home/saas/nodebb/src/controllers/admin/plugins.js:54:9)"}
    2023-09-15T07:36:33.224Z [4567/3649] - error: TypeError: Invalid Version: 3.2.00001
        at new SemVer (/home/saas/nodebb/node_modules/semver/classes/semver.js:38:13)
        at compare (/home/saas/nodebb/node_modules/semver/functions/compare.js:3:3)
        at Object.gt (/home/saas/nodebb/node_modules/semver/functions/gt.js:2:29)
        at /home/saas/nodebb/src/plugins/index.js:232:42
        at Array.forEach (<anonymous>)
        at Plugins.normalise (/home/saas/nodebb/src/plugins/index.js:204:19)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
        at async Plugins.list (/home/saas/nodebb/src/plugins/index.js:178:10)
        at async getPlugins (/home/saas/nodebb/src/controllers/admin/plugins.js:63:23)
        at async getCompatiblePlugins (/home/saas/nodebb/src/controllers/admin/plugins.js:54:9)
    

    When I tried to build and restart, I saw this in the logs:

    2023-09-15T07:37:46.516Z [4567/3649] - warn: You have no mongo username/password setup!
    2023-09-15T07:37:46.562Z [4567/3649] - warn: [plugins] "nodebb-plugin-saas" is active but not installed.
    2023-09-15T07:37:46.610Z [4567/3649] - info: [build] Building in series mode
    2023-09-15T07:37:46.611Z [4567/3649] - info: [build]         plugin static dirs  build started
    2023-09-15T07:37:46.626Z [4567/3649] - info: [build]         plugin static dirs  build completed in 0.015sec
    2023-09-15T07:37:46.627Z [4567/3649] - info: [build]          requirejs modules  build started
    2023-09-15T07:37:47.152Z [4567/3649] - error: [build]          requirejs modules  build failed
    2023-09-15T07:37:47.152Z [4567/3649] - error: [build] Encountered error during build step
    2023-09-15T07:37:47.153Z [4567/3649] - error: admin.reload
    Error: ENOENT: no such file or directory, stat '/home/saas/nodebb/node_modules/nodebb-plugin-saas/public/lib/admin.js'
    2023-09-15T07:38:46.217Z [4567/3649] - error: Error loading https://packages.nodebb.org/api/v1/plugins?version=3.4.2 Invalid Version: 3.2.00001 {"stack":"TypeError: Invalid Version: 3.2.00001\n    at new SemVer (/home/saas/nodebb/node_modules/semver/classes/semver.js:38:13)\n    at compare (/home/saas/nodebb/node_modules/semver/functions/compare.js:3:32)\n    at Object.gt (/home/saas/nodebb/node_modules/semver/functions/gt.js:2:29)\n    at /home/saas/nodebb/src/plugins/index.js:232:42\n    at Array.forEach (<anonymous>)\n    at Plugins.normalise (/home/saas/nodebb/src/plugins/index.js:204:19)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Plugins.list (/home/saas/nodebb/src/plugins/index.js:175:10)\n    at async getPlugins (/home/saas/nodebb/src/controllers/admin/plugins.js:63:23)\n    at async getCompatiblePlugins (/home/saas/nodebb/src/controllers/admin/plugins.js:54:9)"}
    2023-09-15T07:38:46.305Z [4567/3649] - error: Error loading https://packages.nodebb.org/api/v1/plugins Invalid Version: 3.2.00001 {"stack":"TypeError: Invalid Version: 3.2.00001\n    at new SemVer (/home/saas/nodebb/node_modules/semver/classes/semver.js:38:13)\n    at compare (/home/saas/nodebb/node_modules/semver/functions/compare.js:3:32)\n    at Object.gt (/home/saas/nodebb/node_modules/semver/functions/gt.js:2:29)\n    at /home/saas/nodebb/src/plugins/index.js:232:42\n    at Array.forEach (<anonymous>)\n    at Plugins.normalise (/home/saas/nodebb/src/plugins/index.js:204:19)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async Plugins.list (/home/saas/nodebb/src/plugins/index.js:175:10)\n    at async getPlugins (/home/saas/nodebb/src/controllers/admin/plugins.js:63:23)\n    at async getAllPlugins (/home/saas/nodebb/src/controllers/admin/plugins.js:58:9)"}
    2023-09-15T07:38:46.394Z [4567/3649] - error: TypeError: Invalid Version: 3.2.00001
        at new SemVer (/home/saas/nodebb/node_modules/semver/classes/semver.js:38:13)
        at compare (/home/saas/nodebb/node_modules/semver/functions/compare.js:3:3)
        at Object.gt (/home/saas/nodebb/node_modules/semver/functions/gt.js:2:29)
        at /home/saas/nodebb/src/plugins/index.js:232:42
        at Array.forEach (<anonymous>)
        at Plugins.normalise (/home/saas/nodebb/src/plugins/index.js:204:19)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
        at async Plugins.list (/home/saas/nodebb/src/plugins/index.js:178:10)
        at async getPlugins (/home/saas/nodebb/src/controllers/admin/plugins.js:63:23)
        at async getCompatiblePlugins (/home/saas/nodebb/src/controllers/admin/plugins.js:54:9)
    2023-09-15T07:38:46.445Z [4567/3649] - error: TypeError: Invalid Version: 3.2.00001
        at new SemVer (/home/saas/nodebb/node_modules/semver/classes/semver.js:38:13)
        at compare (/home/saas/nodebb/node_modules/semver/functions/compare.js:3:3)
        at Object.gt (/home/saas/nodebb/node_modules/semver/functions/gt.js:2:29)
        at /home/saas/nodebb/src/plugins/index.js:232:42
        at Array.forEach (<anonymous>)
        at Plugins.normalise (/home/saas/nodebb/src/plugins/index.js:204:19)
        at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
        at async Plugins.list (/home/saas/nodebb/src/plugins/index.js:178:10)
        at async getPlugins (/home/saas/nodebb/src/controllers/admin/plugins.js:63:23)
        at async getAllPlugins (/home/saas/nodebb/src/controllers/admin/plugins.js:58:9)
    

    When I tried to just restart, the server seems down now, and is showing a 502 page.

    I guess I killed my instance 😛

  • @Lmame hello, your forum should be backup, I've created an issue to fix the underlying problem https://github.com/NodeBB/NodeBB/issues/12009. Looks like semver module doesn't like the version string of nodebb-widget-rss which was 3.2.00001. So please wait until that issue is resolved before installing that plugin.

  • @baris Thanks a lot, it's working now ^_^
    I will wait for the RSS plugin 🙂

  • L Lmame has marked this topic as solved

Suggested Topics