Ionic2CLI-Meteor-WhatsApp icon indicating copy to clipboard operation
Ionic2CLI-Meteor-WhatsApp copied to clipboard

Angular CLI - Cannot find module 'meteor/accounts-base'

Open Tusabras opened this issue 7 years ago • 7 comments

Hey guys, I got stuck during the tutorial, I was trying to do it using the Angular-CLI and I popped up with the problem that the system couldn't find the accounts-base module

Here is a link with the code (inside the api/server/main.ts there is the import line commented )

https://github.com/Tusabras/meteor-angular-cli

I would really appreciate if someone could help out!:)

Tusabras avatar Nov 17 '17 12:11 Tusabras

I got he same problem! When I try to build the project I got this message: Cannot find module 'meteor/accounts-base

battistafranco avatar Nov 20 '17 17:11 battistafranco

Same problem here, is there a solution yet?

michaelb-01 avatar Dec 09 '17 22:12 michaelb-01

look in .meteor folder, find packages do you have a package called "accounts-password"?

if not, you have to add it: meteor add accounts-password try to refresh your server.

Be advice: I am using meteor with react. But it should work for you to.

revengelesly avatar Dec 11 '17 12:12 revengelesly

Yes I do have the accounts-password package, this is my packages file:

# Meteor packages used by this project, one per line.
# Check this file (and the other files in this directory) into your repository.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

[email protected]             # Packages every Meteor app needs to have
[email protected]       # Packages for a great mobile UX
[email protected]                   # The database Meteor supports right now
[email protected]            # Reactive variable for tracker
[email protected]                 # Meteor's client-side reactive programming library

[email protected]   # CSS minifier run for production mode
[email protected]    # JS minifier run for production mode
[email protected]                # ECMAScript 5 compatibility for older browsers
[email protected]              # Enable ECMAScript2015+ syntax in app code
[email protected]            # Server-side component of the `meteor shell` command

[email protected]                # Allow all DB writes from clients (for prototyping)
angular-compilers
accounts-base
accounts-ui
accounts-password
anti:fake

One thing to note is that i'm using the meteor-client bundler. It's essentially the same as this:

https://github.com/darkbasic/angularcli-meteor

As a hacky workaround i've disabled my import statement for accounts-base but i've declared Accounts like:

declare var Accounts: any;

And I still have the functionality of the accounts package, e.g. I can do Accounts.createUser()

michaelb-01 avatar Dec 11 '17 13:12 michaelb-01

@michaelb-01 please where did you declare var Accounts: any;. I am presently running this project and it's returning the same error. Just help me with file you declared it in.

ken4ward avatar Mar 30 '18 23:03 ken4ward

Same problem here. Any advice?

mfechner avatar May 02 '18 05:05 mfechner

declare var Accounts: any; in phone.ts and/or declare module 'meteor/accounts-base'; in src/declarations.d.ts

poparotsy avatar Jun 06 '18 15:06 poparotsy