Fail to import npm package shortid

I’m trying to import shortid (

I’ve done npm install shortid --save, and then added import shortid from 'shortid'; in my code. This fails with


Error: Cannot find module './lib/index'
    at require (packages/modules-runtime.js:123:19)
    at meteorInstall.node_modules.shortid.index.js (packages/modules.js:976:18)
    at fileEvaluate (packages/modules-runtime.js:197:9)

Which I think is coming from that is correctly refering

I’ve check that all the files are where they should be in my node modules so I don’t get why Meteor is failing. I’m on Meteor as suggested by the logs.

Not sure if this is relevant, but maybe it’s worth trying the full extension (i.e. ./lib.index.js) by editing the local package in node_modules directly.

This shouldn’t be an issue as the extension should be able to be omitted (as per #6152), but it’s worth a try anyways.

Thanks. I should have mentioned I tried that as well to no avail. Since the package is small I’ve moved it to my code for the time being…