Where can we find more info on the new hookSend
hook for the email package?
Right now I only made public what was before internal hook.
Made a PR to the docs to add a short explanation.
In essence you pass in a function into Email.hookSend
which is going to receive object about the email to send. You can do what ever you want and either return true
to proceed or false
to not send the message.
In a future release we should probably add another hook to allow editing the data…
That’s awesome thanks!
Editing the content would be nice, but what I wanted to use it for is something simpler.
I don’t want to get stung by my email API costs if something goes wrong with my app.
So this is a useful way to code in a kill switch if something were to break and my app tried to send 10,000 emails an hour overnight or something stupid. Unlikely but a nice feature nevertheless.
Just keep a running total of emails sent since midnight and if it crosses some unrealistic threshold, drop the email and alert me somehow.
Updated to Meteor 1.11 and got these errors
error: Conflict: Constraint email@1.2.3 is not satisfied by email 2.0.0.
Constraints on package "email":
* email@~2.0.0 <- top level
* email@1.2.3 <- kschingiz:meteor-elastic-apm 2.4.0
What is the best way to make an existing package to work with the new email package?
Fork, update the dependency and use from packages
folder.
Or, overpower the transient dependency with an exclamation point!
email@~2.0.0!
As requested in: https://github.com/meteor/meteor-feature-requests/issues/208
and implemented in https://github.com/meteor/meteor/commit/4a70b12eddef00b6700f129e90018a6076cb1681
After meteor update
from 1.10, my app fails with the following
=> Started proxy.
/Users/robertdickert/.meteor/packages/static-html/.1.2.2.1httr42.mghq++os+web.browser+web.cordova/plugin.compileStaticHtmlBatch.os/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:190
throw error;
^
TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The "to" argument must be of type string. Received null
at validateString (internal/validators.js:120:11)
at Object.relative (path.js:1054:5)
at Object.wrapper [as pathRelative] (/Users/robertdickert/.meteor/packages/meteor-tool/.1.11.0.q6y7e2.89d8a++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/tools/static-assets/server/tools/static-assets/server/mini-files.ts:107:14)
we recently removed blaze and are using static-html (with React) - not sure if there’s something wrong with how we did this, but the app works in 1.10.
In your project, try any of the following:
- Delete meteor local cache:
rm -rf .meteor/local
- Re-install Meteor
curl https://install.meteor.com/ | sh
I was having the same ERR_INVALID_ARG_TYPE issue and had to go a few steps further to fix it.
rm -rf node_modules
rm package-lock.json
meteor reset
rm -rf .meteor/local
curl https://install.meteor.com/ | sh
Yeah i was expecting the updated docker image too. But it wasnt updated and we wanted to deploy to our production server immediatly. So i created my own own docker image out of @abernix 's docker image for updateded meteor and node versions. So you can use it for the time being until he updates his docker.
https://forums.meteor.com/t/i-created-updated-docker-image-for-meteor-1-11/53847
Thanks.
nice,thank you ver much
Clearing caches are for the ERR_INVALIDARG_TYPE errors.
For package version constraints, both the answers of @storyteller and @coagmano above works
@coagmano’s recommended is a lot easier to implement
this is an awesome release!
Way faster & way less CPU on my machine
Thanks for all the work!
Thanks. I had to use the same to resolve the issue. I also recently removed blaze and am using static-html (with svelte).
Had to do these further steps as well (after 1.11.1 update) - thanks for sharing!
I’m also running into this and reinstalling Meteor didn’t seem to help so far…
EDIT: I have another project that’s been running 1.11.1 fine (I forgot I updated it already) so the error has to be related to something else. I’ll keep investigating.
Ran into this problem too.
Ultimate source of the problem is broken symlinks in the project’s node_modules/.bin
They don’t seem to bother 1.10, but 1.11 gives the
ERR_INVALID_ARG_TYPE
I simply deleted the broken symlinks and all was well.
This helped solve the same problem after the upgrade to 1.11.1 for me, although I simply rename the node_modules/.bin directory. But I wonder why and how this directory caused the problem…?
Thanks a lot! I’ll look into it.