I’ve created a new app using meteor create.
I notice that already the meteor create command makes a 1.3 type of app, complete with the new import system and so on. Great, I want to make a start on that.
server/main.js (created automatically) is as follows:
import { Meteor } from 'meteor/meteor';
Meteor.startup(() => {
// code to run on server at startup
});
I want to start using Restivus, so immediately below the {Meteor} import I add the following:
import { Restivus } from 'meteor/kahmali:meteor-restivus';
Starting the app now fails with the following message:
Error: Can’t find npm module ‘meteor/kahmali:meteor-restivus’. Did you forget to call ‘Npm.depends’ in package.js within the ‘modules-runtime’ package?
After a year of using Meteor I fail on the first line I add to my code in a new app.
Any help would be much appreciated.
Did you add the kahmali:meteor-restivus package to your app using meteor add?
I agree the message is really misleading since this doesn’t have to do with NPM. @benjamn we should probably detect the meteor/ prefix and warn about Atmosphere instead!
I think it would be pretty sweet if Meteor detected a valid reference to a package that hasn’t been npm installed yet and just installed it for you when it starts. npm install x does feel a bit redundant if you also have to write import { Foo } from 'Bar' somewhere anyway.