Closed (fixed)
Project:
Node.js integration
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Aug 2011 at 14:31 UTC
Updated:
18 Jan 2016 at 17:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedyes, thanks for posting this!
Comment #2
markwk commentedThis seems like a nice approach.
I'm having some trouble running node.js integration module with drupal 7 via no.de from joyent, it seems like I'll need:
Anything else?
Comment #3
rogical commentedcodes/files for nodejs server should be in an standalone directory, less confusing.
Comment #5
denes.szabo commentedFirst I installed the nodejs modules with the npm install as the readme said. It brokes the site if you are using the features module. (I debugged there is a .info file in the node_modules directory. The Drupal regards it as a module's info file. Something happens, but php dies with segfault.)
So I installed the node_modules into the sites/all/libraries/nodejs directory. First I copied the package.json there, then I run the npm install in this dir.
This is my chatroom starting script:
This script is in the profiles/myprofile/bin (the cd step back three levels). The important thing is setup the NODE_PATH env variable.
Comment #6
juliakoelsch commentedI just spent time troubleshooting a segfault error occurring when trying to use Features, and I eventually landed here.
The .info files in the node_modules directory are definitely the issue. Drupal gets confused because its expecting .info files to describe a module. There's an issue here to hopefully fix this in core: https://www.drupal.org/node/2329453
The workaround in that thread is to delete the .info files in the node_module directory. Doing this fixed the problem for me. Just wanted to share in case it helps someone else with the same issue.
Comment #7
Anonymous (not verified) commentedreviving this.
https://github.com/search?utf8=%E2%9C%93&q=drupal+nodejs
suggestions for names most welcome, else i'm going to create something like 'drupal-nodejs' because i hate names.
Comment #8
glekli commentedMy vote would be for something that contains the full module name, like "Node.js Integration for Drupal"
Comment #9
glekli commentedI have taken the first crack at dividing server.js into submodules (re: #2634908: Organize node.js server into submodules). You can see my progress here:
https://github.com/glekli/drupal-nodejs
Please let me know if the direction I'm headed looks ok, and, if so, I'll issue a pull request into your repo when you have it set up.
Comment #10
Anonymous (not verified) commentedawesome!
please go ahead and add a PR to https://github.com/beejeebus/drupal-nodejs
at this point, i'd err on the side of just getting the code reorganisation done, and getting npm install working.
once that's in and works, we can refactor with less fear.
Comment #11
glekli commentedI have put in a pull request: https://github.com/beejeebus/drupal-nodejs/pull/1
By "just getting the code reorganisation done", do you mean just moving server.js to an npm module without any changes?
Comment #12
Anonymous (not verified) commentedthanks for the PR, merged, looks great.
re. refactoring - it's just an order of operations thing. with your initial reorg in now, i'd prefer we focus on shipping the D8 module code and getting the node.js stuff registered on npmjs.com.
after that, i'm happy to continue refactoring/enhancing the code on github and d.o. and releasing new versions.
Comment #14
Anonymous (not verified) commentedok, i think we can close this now.
Gergely's awesome refactor is in, and the npmjs.com stuff is sorted out. for docs for the new way, i've created #2639020: provide good documentation for setting up the module from npm
Comment #15
Anonymous (not verified) commentedComment #16
glekli commentedLet me reopen this for one more task to discuss: shall we remove the nodejs app from 7.x as well?
I think, for maintainability, it would be better if there was only one nodejs app to keep up to date. Another benefit is that there would be no need to create a new release for the drupal module if there is an update that only apples to the nodejs app.
Comment #17
Anonymous (not verified) commentedI agree re. D7 and the same code base.
The only thing we have to consider is the transition.
What steps will D7 sites that are upgrading have to take?
Also, the node.js refactor itself, I'd like to see more reports that people are using it, and or a test suite for it before we tell existing sites to make this change.
Comment #18
glekli commentedIn a nutshell, the two steps needed to switch a D7 site would be applying the module update and installing the nodejs app from NPM or GitHub. After that, the process should be the same as before.
Here are some possible concerns that come to mind:
- The same release that removes the nodejs app from 7.x will also need to include any changes that may be needed to remain compatible with the new server app.
- The configuration file remains compatible, so no changes should be needed there.
- The extension api is mostly backwards compatible, but there is some change in the 'setup' hook. That means extensions may break after the update. As far as I can judge Chat Room andDrupalChat are the two most prevalent modules that depend on Nodejs. Chat Room does not have an extension. DrupalChat does have one. It would be best to coordinate with that module's developers.
Are there any other concerns?
Does anyone know of other modules that depend on NodeJs Integration and have their own nodejs extension?
Comment #19
glekli commentedI'm attaching a patch that removes the nodejs app from 7.x and applies all enhancements we have made since pulling out the nodejs app. (In particular, https://github.com/beejeebus/drupal-nodejs/issues/2 and https://github.com/beejeebus/drupal-nodejs/issues/7)
Comment #20
Anonymous (not verified) commentedthis looks fine to me, go ahead and push it. please don't roll a release from it yet.
Comment #22
glekli commentedGreat, thanks. Committed.