You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Created my own ZIP as described with the provided code and added the mentioned Markup.js. However, there were some minor errors:
You have to declare the AWS region if not in the standard one.
There is a typo in index.js when invoking the Markup.js (Markup-js instead of Markup.js)
Once solved these it throws the "Cannot call method 'match' of undefined" error.
Here's the log: START RequestId: 15c2b976-fa62-11e5-ae3d-eb178e7400bf Version: $LATEST 2016-04-04T12:38:08.765Z 15c2b976-fa62-11e5-ae3d-eb178e7400bf Event: {"email":"adcgn@mailinator.com","name":"Customer Name","message":"Hello World! Going to the moon!"} 2016-04-04T12:38:08.765Z 15c2b976-fa62-11e5-ae3d-eb178e7400bf Loading template from Templates/Template.html in mailtest.staticmailer.com 2016-04-04T12:38:09.405Z 15c2b976-fa62-11e5-ae3d-eb178e7400bf Template Body: ���2016-04-04T12:38:09.566Z 15c2b976-fa62-11e5-ae3d-eb178e7400bf TypeError: Cannot call method 'match' of undefined at Object.Mark.up (/var/task/markup.js:158:25) at Response.<anonymous> (/var/task/index.js:62:32) at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:354:18) at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:105:20) at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:77:10) at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:596:14) at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:21:10) at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12) at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10 at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:37:9) END RequestId: 15c2b976-fa62-11e5-ae3d-eb178e7400bf REPORT RequestId: 15c2b976-fa62-11e5-ae3d-eb178e7400bf Duration: 892.83 ms Billed Duration: 900 ms Memory Size: 128 MB Max Memory Used: 16 MB Process exited before completing request
Any idea?
The text was updated successfully, but these errors were encountered:
In our projects, we used NPM to install the markup-js project. When this is done, it's loaded by require('markup-js'). If you are downloading markup.js yourself, then you'll need to adjust the require statement. I have added a package.json file so you should be able to just npm install to get the dependencies.
If you're getting an error Cannot call method 'match' of undefined, then your template is undefined when calling mark.up. Based on the logs you posted, the subject is the culprit. Since you're not setting a subject in your event, then it tries to pull the default subject from config.js. Ensure a default subject is defined:
Created my own ZIP as described with the provided code and added the mentioned Markup.js. However, there were some minor errors:
Once solved these it throws the "Cannot call method 'match' of undefined" error.
Here's the log:
START RequestId: 15c2b976-fa62-11e5-ae3d-eb178e7400bf Version: $LATEST 2016-04-04T12:38:08.765Z 15c2b976-fa62-11e5-ae3d-eb178e7400bf Event: {"email":"adcgn@mailinator.com","name":"Customer Name","message":"Hello World! Going to the moon!"} 2016-04-04T12:38:08.765Z 15c2b976-fa62-11e5-ae3d-eb178e7400bf Loading template from Templates/Template.html in mailtest.staticmailer.com 2016-04-04T12:38:09.405Z 15c2b976-fa62-11e5-ae3d-eb178e7400bf Template Body: ���2016-04-04T12:38:09.566Z 15c2b976-fa62-11e5-ae3d-eb178e7400bf TypeError: Cannot call method 'match' of undefined at Object.Mark.up (/var/task/markup.js:158:25) at Response.<anonymous> (/var/task/index.js:62:32) at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:354:18) at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:105:20) at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:77:10) at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:596:14) at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:21:10) at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12) at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10 at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:37:9) END RequestId: 15c2b976-fa62-11e5-ae3d-eb178e7400bf REPORT RequestId: 15c2b976-fa62-11e5-ae3d-eb178e7400bf Duration: 892.83 ms Billed Duration: 900 ms Memory Size: 128 MB Max Memory Used: 16 MB Process exited before completing request
Any idea?
The text was updated successfully, but these errors were encountered: