Hostwiki / wikijs-sitemap

Sitemap for Wiki.js
MIT License
11 stars 2 forks source link

Error: Cannot find module 'node-cron' #3

Closed crztssr closed 1 year ago

crztssr commented 1 year ago

Hi! Thanks a lot for your tool. Yesterday was the first time I noticed missing sitemap.xml for wiki.js and first link in google lead to your repository created two days ago :)

Got following issue:

wiki@myhost:/data/wiki/wikijs-sitemap$ node server
node:internal/modules/cjs/loader:998
  throw err;
  ^

Error: Cannot find module 'node-cron'
Require stack:
- /data/wiki/wikijs-sitemap/server.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/data/wiki/wikijs-sitemap/server.js:3:14)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
    at Module.load (node:internal/modules/cjs/loader:1043:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/data/wiki/wikijs-sitemap/server.js' ]
}

Resolved it by installing node-cron

wiki@myhost:/data/wiki/wikijs-sitemap$ npm install --save node-cron

Probably it might be added to Installation section

Philipinho commented 1 year ago

Oh, I should update the Readme for standalone installation. I forgot to add the npm package installation part. Thanks for pointing out.

Philipinho commented 1 year ago

Fixed https://github.com/Hostwiki/wikijs-sitemap/commit/70c90cdc12580ec1ccdc4a4381cc95cf461a841a