Usually, a NodeJS module will have a paths property. Unfortunately, the current implementation of Module class does not have it, and since some npm packages may assume its existence, this results in runtime errors, e.g.
https://github.com/mochajs/mocha/blob/master/lib/mocha.js#L28
In this case import 'mocha' results in:
TypeError: Cannot read property 'push' of undefined
at meteorInstall.node_modules.mocha.lib.mocha.js (node_modules/mocha/lib/mocha.js:29:1)
at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)
Usually, a NodeJS
modulewill have apathsproperty. Unfortunately, the current implementation ofModuleclass does not have it, and since some npm packages may assume its existence, this results in runtime errors, e.g.https://github.com/mochajs/mocha/blob/master/lib/mocha.js#L28
In this case
import 'mocha'results in: