keystone-email icon indicating copy to clipboard operation
keystone-email copied to clipboard

Fixed import path for NodeMailer transport

Open dacre-denny opened this issue 5 years ago • 7 comments

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

dacre-denny avatar Dec 26 '19 02:12 dacre-denny

I stumbled over the same problem. Is this module still maintained? This fix works for me.

f10l avatar Feb 12 '20 08:02 f10l

@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?

dacre-denny avatar Feb 12 '20 09:02 dacre-denny

Same issue here! How it is still unmerged?

chomamateusz avatar Mar 14 '20 12:03 chomamateusz

Not sure - it'd be nice to see this resolved!

dacre-denny avatar Mar 18 '20 09:03 dacre-denny

@JedWatson Hello! Please approve this PR

Findoss avatar May 31 '20 20:05 Findoss

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 :/

joselcvarela avatar Sep 08 '20 05:09 joselcvarela

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

loklaan avatar Sep 25 '20 20:09 loklaan