I've been attempting to integrate the moment-timezone npm package into my meteor app without success. While the atmosphere package works smoothly, I prefer to use the npm package since the atmosphere one is no longer being updated. I have completely removed the atmosphere package from the app before trying to implement the npm version.
Upon running meteor npm list --tree
, I noticed that towards the end, the moment-timezone package and its dependency are displayed:
└─┬ <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="85e8eae8e0ebf1a8f1ece8e0ffeaebe0c5b5abb0abb7b6">[email protected]</a>
└── <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="395456545c574d790b170b0b170b">[email protected]</a>
When I execute meteor npm install
, the output shows:
audited 107 packages in 1.913s
found 0 vulnerabilities
In the file where I'm utilizing moment-timezone, I've included:
import moment from 'moment-timezone';
Despite this, the JavaScript console indicates an error with the import of both moment and moment-timezone:
SyntaxError: Unexpected identifier 'moment'. The import call expects exactly one argument.
According to the console error, these two lines in separate files are highlighted in red:
import moment from 'moment';
import moment from 'moment-timezone';
It seems like there is a resolution issue with the packages, even though they appear to have been installed correctly and meteor npm install ran smoothly.
The app is built on meteor 1.8
I'm currently stuck and any assistance would be highly appreciated!
Thanks