Why should NodeJS be installed in the module folder?
1) Normally it should be outside docroot.
2) If it is placed in the module folder, it means that it will need to be reinstalled and re-configured each time the module is updated. It's going to be a problem with Composer.
NodeJS must be installed outside of docroot and manually set up. The configuration must correspond to that configured in the interface of the Private Message module (same operation as the Drupal Node.js integration module).
OR
NodeJS must be included directly with the module (during installation) and configured directly from the Private Message interface. I am not devellopeur and I do not know if it is possible.
OR
Private Message could only be installed with Composer (as is the case with Drupal Commerce) and requires a NodeJS dependency. I am not devellopeur and I do not know if it is possible.
Comments
Comment #2
zenimagine commentedComment #3
zenimagine commentedComment #4
jaypanComment #6
zenimagine commentedAwesome you are back ;-)
Can you explain the changes? thank you
Comment #7
jaypanI'm not done yet. I'll post more when I am finished.
Comment #8
zenimagine commentedok thank you
Comment #9
jaypanI've had to do a major re-structure to get this all to work properly. I did the following:
1) Created a new composer library for the node-js backend for the library, and made that library available publicly as a composer library
2) Removed the Private Message Node.js module as a sub-module of the Private Message module
3) Created a new Drupal.org project for the Private Message Node.js module.
4) Created a new Drupal.org project called the Vendor Stream Wrapper module, which the Private Message Node.js module uses to resolve the path to a required file in the vendor directory.
Upgrading your system to handle the new structure may be a little difficult. I would suggest:
1) Run
composer require drupal/private_message_nodejs.2) Update the Private Message module. The Private Message module must be version 8.x-2.0-beta5 or greater.
3) Ensure that the Vendor Stream Wrapper module has been added to your file system.
4) Ensure that the
[VENDOR FOLDER]/jaypan/private-message-nodejsfolder exists5) Navigate to
[VENDOR FOLDER]/jaypan/private-message-nodejs, and runnpm install6) In the same folder, run
node app.jsand ensure it runs correctly.Comment #10
zenimagine commentedthanks, I opened up problems on https://www.drupal.org/project/issues/private_message_nodejs