Problem with a saas instance when installing a plugin (spawn yarn NOENT)
-
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):
In the console log I see:
2023-09-15T04:24:55.234Z [4567/2178] - [31merror[39m: 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 (?)
-
@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 usingyarn
, 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:
Then when I tried to navigate back to the plugins, the list was empty:
I saw this in the logs:
2023-09-15T07:34:07.486Z [4567/3649] - [31merror[39m: 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] - [31merror[39m: 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] - [31merror[39m: 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] - [33mwarn[39m: You have no mongo username/password setup! 2023-09-15T07:37:46.562Z [4567/3649] - [33mwarn[39m: [plugins] "nodebb-plugin-saas" is active but not installed. 2023-09-15T07:37:46.610Z [4567/3649] - [32minfo[39m: [build] Building in series mode 2023-09-15T07:37:46.611Z [4567/3649] - [32minfo[39m: [build] plugin static dirs build started 2023-09-15T07:37:46.626Z [4567/3649] - [32minfo[39m: [build] plugin static dirs build completed in 0.015sec 2023-09-15T07:37:46.627Z [4567/3649] - [32minfo[39m: [build] requirejs modules build started 2023-09-15T07:37:47.152Z [4567/3649] - [31merror[39m: [build] requirejs modules build failed 2023-09-15T07:37:47.152Z [4567/3649] - [31merror[39m: [build] Encountered error during build step 2023-09-15T07:37:47.153Z [4567/3649] - [31merror[39m: 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] - [31merror[39m: 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] - [31merror[39m: 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] - [31merror[39m: 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] - [31merror[39m: 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. -