Components can't load from global pubsweet -> global pubsweet-server
If you install pubsweet globally (as is recommended and desired), when you try to start an application using 'pubsweet start', it will fail with something like this:
Error: Cannot find module 'pubsweet-component-ink-backend'
at Function.Module._resolveFilename (module.js:527:15)
at Function.Module._load (module.js:476:23)
at Module.require (module.js:568:17)
at require (internal/module.js:11:18)
at config.get.forEach.name (/Users/juretriglav/.nvm/versions/node/v8.7.0/lib/node_modules/pubsweet/node_modules/pubsweet-server/src/register-components.js:7:25)
at Array.forEach (<anonymous>)
If you look at the stack trace, it's trying to find the component in the globally installed pubsweet-server
, which gets installed as a dependency of pubsweet
. The components will not be available in that scope, only in the app scope.
This is a blocker for all apps using latest pubsweet release.