Topic on Talk:Offline content generator/Installation/en

Kghbln (talkcontribs)
cd /.../extensions/Collection
git clone https://gerrit.wikimedia.org/r/p/mediawiki/extensions/Collection/OfflineContentGenerator.git
cd OfflineContentGenerator
npm install -g node-gyp
npm install

Created localsettings.js

./mw-ocg-service.js -c localsettings.js
/.../w/extensions/Collection/OfflineContentGenerator/lib/cli.js:33
		config = require(configFile)(config) || config;
		                            ^
TypeError: object is not a function
    at Object.exports.parseConfig (/.../w/extensions/Collection/OfflineContentGenerator/lib/cli.js:33:31)
    at Object.<anonymous> (/.../w/extensions/Collection/OfflineContentGenerator/mw-ocg-service.js:46:18)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3
Cscott (talkcontribs)

Could you paste the contents of your localsettings.js please? It looks like some sort of problem there.

Kghbln (talkcontribs)

Well I deleted all this OCG stuff so I cannot recreate right now. The "localsettings.js" however should have had the contents as created by

./mw-ocg-service.js -c localsettings.js

So no manual intervention was done by me since it is not necessary according to the installation instructions. I will try to recreate the issue on another server an get back with the contents of this file.

Kghbln (talkcontribs)

Ah, I installed Parsoid from the Linux package so I have a settings.js and not a localsettings.js

        parsoidConfig.setMwApi({
                uri: 'https://www.example.org/w/api.php',
                domain: 'example.org',
                prefix: 'eorg'
        });

Probably the result will be that one should not install Parsoid from package if the ocg should be used. Oh dear

Cscott (talkcontribs)

I think the confusion is that OCG has its *own* settings file. You shouldn't use Parsoid's `localsettings.js` as a configuration file for OCG. In fact, as the installation instructions suggest, if you have the PHP side configured correctly, you shouldn't need a localsettings.js for OCG at all.

Kghbln (talkcontribs)

Have not tried since since mwlib is still working on Debian 8 but I will have another go soon.

Reply to "Something is wrong"