I am developing an npm package that uses
import {Meteor} from ‘meteor/meteor’
Unfortunately the startup of my meteor app fails when I use my npm package with it:
Error: Cannot find module ‘meteor/meteor’
even though I have installed it in package itself and the meteor app:
…
“dependencies”: {
"@types/meteor": “^1.4.12”,
…
herteby
2
You have to use require('meteor/meteor')
instead of import I think.
Also, @types/meteor
is just TypeScript definitions for Meteor.
The package is written in typescript. The resulting js transpiles to:
require(‘meteor/meteor’)
And meteor complains that the package meteor/meteor cannot be required.