Import HTTP on server, "Cannot find npm module 'meteor/http'"


#1

I’m trying to import the Meteor HTTP package on the server within an atmosphere package like so

import { HTTP } from 'meteor/http';

but I keep getting an error because Meteor is trying to import it as an npm package

/home/me/.meteor/packages/meteor-tool/.1.3.2_4.p39bnb++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:267
W20160625-13:34:26.451(-7)? (STDERR)            				throw(ex);
W20160625-13:34:26.451(-7)? (STDERR)            				      ^
W20160625-13:34:26.746(-7)? (STDERR) Error: Can't find npm module 'meteor/http'. Did you forget to call 'Npm.depends' in package.js within the 'modules-runtime' package?
W20160625-13:34:26.746(-7)? (STDERR)     at Object.Npm.require (/home/me/Projects/thisProject/demo/.meteor/local/build/programs/server/boot.js:195:17)

Has anyone seen this before? I’m on Metoer 1.3.2.4


#2

Nevermind, ignore this. I didn’t realize that the “http” package wasn’t part of meteor base, I just had to add it in the package’s package.js as api.use('http');