Cannot import npm modules, meteor 1.3.1

I recently updated my project from version 1.2.1 to 1.3.1 but had issues due to highcharts. I found a similar issue on GitHub and followed the steps provided that worked for others. I removed the old atmosphere package and installed the package with meteor npm install.

The problem I have now is I cannot import these packages. When I use
import Highcharts from 'highcharts';
I get the following error in the console: Uncaught SyntaxError: Unexpected token import

I tried installing and importing moment and it failed in the same manner. I have thus far not been able to figure out a solution for this. I would hate to be stuck using version 1.2.1 so any help is much appreciated.

Check to make sure you have the ecmascript and modules packages installed?

Also, just checking that you are not trying to call import from the console. You can’t do this and have to use require from the console instead.

1 Like