Getting Cannot find module 'meteor/alanning:roles' Error


Hi All:

New to Meteor here. Having trouble figuring out why I get this error. I’m basically running through the Angular 2 Socially tutorial and trying to add roles to the project.

I added the roles package with the following command:

meteor add alanning:roles

Then in the fixtures I added a users.js file where I check to see if there are any existing Meteor.users. If not, create an admin user and add it to the ‘admin’ role. When I import Roles I get an error.

This is the import command:

import { Roles } from ‘meteor/alanning:roles’;

Am I missing something? Any help would be appreciated.

Thanks in advance.


What error are you getting?


Hi Rob, thanks for the response. The error I’m getting is:

Cannot find module ‘meteor/alanning:roles’.


That looks ok to me. Can you post some more code where you’re referencing it?


Hi Rob,

I found out it was a typings issue and that the alanning:roles package needed to be included.

Thanks for the help.


I think next time we really need to ask “Are you using TypeScript?” first…



Please, can you detail what you are doing to resolve the issue?



Hi, I’m getting the same error even though I have added the package to my project and is importing it correctly.

import { Roles } from ‘meteor/alanning-roles’;

meteor add alanning:roles