question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: u.types.isBoxedPrimitive is not a function

See original GitHub issue

I am converting our project from mailgun-js package to mailgun.js package. I am running into this error TypeError: u.types.isBoxedPrimitive is not a function below is how everything is configured.

const formData = require('form-data');
const Mailgun = require('mailgun.js');
const mailgun = new Mailgun(formData);

const data = {
    from: 'from@email.com',
    to: ['to@email.com'],
    subject: 'subject_line',
    template: 'use_template',
    'h:X-Mailgun-Variables':  
        JSON.stringify({
        firstName: 'TestFirstName',
        lastName: 'TestLastName',})
}

mg.messages.create('MY_DOMAIN', data).catch(err => console.log(err))

Any thoughts on what might be the issue, it must be header related but can’t seem to pinpoint it.

Thanks!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Keitharunicommented, Aug 30, 2021

@olexandr-mazepa Going to give this a try again this week, will let you know the results.

0reactions
olexandr-mazepacommented, Nov 18, 2021

It seems like no activity here. I am going to close this issue in a few days because I can’t reproduce this and there is no info that can help me with this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: u.types.isBoxedPrimitive is not a function
TypeError : u.types.isBoxedPrimitive is not a function.
Read more >
TypeError: "x" is not a function - JavaScript - MDN Web Docs
It attempted to call a value from a function, but the value is not actually a function. Some code expects you to provide...
Read more >
TypeError: util.Long.fromValue is not a function - stackdriver
I was facing this issue while creating grpc client in node js and installing long 4.0.0 in package.json solved my issue, thanks man...
Read more >
How to Handle JavaScript Uncaught TypeError: “x” is Not a ...
The Javascript TypeError: "x" is not a function occurs when calling a function on a value or object, which is not actually a...
Read more >
Util | Node.js v19.3.0 Documentation
isBoxedPrimitive(value); util.types. ... If not, then the returned function is a no-op. ... A TypeError will be thrown if the input is not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found