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.