fedwiki / wiki-server

Federated Wiki client and server in Node.js
Other
153 stars 35 forks source link

Plugin Installation Issue #113

Closed opn closed 8 years ago

opn commented 8 years ago

Hi would appreciate any advice and help installing plugins on my local server. I'm stuck :)

I can't get the custom plugins working on localhost. Latest node and npm - fresh install of wiki locally:

Uncaught TypeError: Cannot read property 'emit' of undefined(anonymous function) @ client.js:4m.event.dispatch @ jquery-1.11.3.min.js:4r.handle @ jquery-1.11.3.min.js:4

I posted a video and recorded the issue here - http://issues.fedwiki.org/plugin-installation-issues.html

san650 commented 8 years ago

Hi @opn, could you try loading the server using the published versions of the plugins? instead of using the source from github directly.

To do this, first delete your node_modules/ folder, remove the references to the plugins from the package.json file and then install the plugins with the npm command:

$ npm install --save wiki-plugin-plugins
$ npm install --save wiki-plugin-transport
$ npm install

After that try to load the server again.

Another way to achieve the same is to edit the package.json directly and use the following

"wiki-plugin-plugins": "0.0.1",
"wiki-plugin-transport": "0.0.5"

then run npm install and load the server.

The problem with the approach you tried is that if you use the plugins sources directly, some of the files needed by the wiki client and server are not yet generated, you would need to cd to the plugins folders and run something like grunt build to generate them. This is not needed if you use the published npm packages because those files are already generated and included the in the npm packages.

https://www.npmjs.com/package/wiki-plugin-plugins https://www.npmjs.com/package/wiki-plugin-transport

Hope this helps!

opn commented 8 years ago

@san650 - great that helps a lot :)