keystone-email
keystone-email copied to clipboard
Fixed import path for NodeMailer transport
The relative import path for requireOptional was incorrect and needed an additional ../ prefixed to the existing path to allow the utility module to be located/imported
I stumbled over the same problem. Is this module still maintained? This fix works for me.
@fanick-ber I'm not sure if this module is maintained. Despite being mentioned in the doc's for Keystone's current release, the module itself seems to have been abandoned?
Same issue here! How it is still unmerged?
Not sure - it'd be nice to see this resolved!
@JedWatson Hello! Please approve this PR
For those coming from https://github.com/keystonejs/keystone/tree/master/packages/email here is a simple hack:
Add this to package.json:
"resolutions": { "@keystonejs/email/keystone-email": "https://github.com/joselcvarela/keystone-email" }
Then yarn add @keystonejs/email
It would be much better if this could be merged :/
Another stop-gap suggestion (any largeish web project might have a couple of these):
package.json
{
"scripts": { "postinstall": "./scripts/postinstall.sh" }
}
scripts/postinstall.sh
sed -i '' "s/'\.\.\/util/'\.\.\/\.\.\/util/" ../node_modules/keystone-email/lib/transports/nodemailer/index.js
sed -i '' "s/'pkg'/pkg/" ../node_modules/keystone-email/lib/util/requireOptional.js