Help using BabyParse

I’m trying to get harrison:babyparse working in my app without any success. I’ve added the package to my app and in the file I intend to use it in, I have the following import statement in my clientside code:

import { Baby } from 'meteor/harrison:babyparse';

When I try to console.dir(Baby);, I get undefined. Here’s what BabyParse’s export code looks like:

	// export to Node...
	if ( typeof module !== 'undefined' && module.exports ) {
		module.exports = Baby;
	}

	// ...or as AMD module...
	else if ( typeof define === 'function' && define.amd ) {
		define( function () { return Baby; });
	}

	// ...or as browser global
	else {
		global.Baby = Baby;
	}

Does anyone have a clue why this isn’t working?

Try dropping the curly braces from your import:

import Baby from 'meteor/harrison:babyparse';

1 Like

I installed the NPM package, not the meteor package and I use:

import Baby from 'babyparse';

2 Likes

This is what I wound up doing.