Fail to import npm package shortid

I’m trying to import shortid (https://github.com/dylang/shortid)

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

/home/ubuntu/.meteor/packages/meteor-tool/.1.4.3_2.lfh8k8++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:280
            throw(ex);
            ^

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 https://github.com/dylang/shortid/blob/master/index.js#L2 that is correctly refering https://github.com/dylang/shortid/blob/master/lib/index.js

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 1.4.3.2 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…