2

I try to use the Mailjet Wrapper for Node.js for my Ionic app.

Now I try to connect to the Mail by using following code :-

var connection = require(['node-mailjet'], function(mailjet){
   mailjet.connect('api key', 'api secret'); 
});

But I'm getting this error:-

require.min.js:8 Uncaught Error: Script error for: node-mailjet

Does anybody know how to solve it? I already installed the require.js library.

Shrabanee
  • 2,706
  • 1
  • 18
  • 30

1 Answers1

0

Check out the link for the error you specified in the comment of this answer. Here you can find your solution

This occurs when there is a require('name') call, but the 'name' module has not been loaded yet.

May be something like the above statement is happening in your case i.e. node-mailjet is not loaded when you are trying to use it. (as per the error in the comment I have searched).

Shrabanee
  • 2,706
  • 1
  • 18
  • 30
  • I tried that first but it caused a 'Module name "node-mailjet" has not been loaded yet for context: _. Use require([])' error – user3560087 Jun 01 '16 at 11:54