I’m trying to convert an NPM package into a Meteor package, I forked the repo from github and made changes to it.
Now I’m trying to port it, it depends on, and uses other NPM packages.
Full stack trace for the first file throwing the SyntaxError, if I comment the import it picks a different file that also has an import statement, maths is an external NPM package defined as a requirement in my root meteor’s app package.json
(STDERR) in the root directory of your application.
(STDERR) /Users/octohedron/Documents/App/.meteor/local/build/programs/server/packages/my_package.js:1924
(STDERR) import { MyClass } from 'maths/dist/edit';
(STDERR) ^^^^^^
(STDERR)
(STDERR) SyntaxError: Unexpected reserved word
(STDERR) at Object.exports.runInThisContext (vm.js:53:16)
(STDERR) at /Users/octohedron/Documents/App/.meteor/local/build/programs/server/boot.js:287:30
(STDERR) at Array.forEach (native)
(STDERR) at Function._.each._.forEach (/Users/octohedron/.meteor/packages/meteor-tool/.1.4.1_1.ge5qu0++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
(STDERR) at /Users/octohedron/Documents/App/.meteor/local/build/programs/server/boot.js:128:5
import { MyClass } from 'maths/dist/edit'; => maths is an npm package specified in my package.json at the root of my meteor project.
Do I have to manually transpile all this code to vanilla jS to be able to use it?