2015-08-19 54 views
0

更新了我的流星應用程序,並對其有useraccounts,它突然告訴我要安裝useraccounts:鐵路由與鐵路由器使用它...Useraccounts更新Useraccounts:鐵路由

安裝的包和現在它告訴我

W20150818-19:23:20.744(-6)? (STDERR) Error: changePwd route configured but enablePasswordChange set to false! 

,並不會啓動我的應用程序,但我AccountsTemplates.configure({已全部seted爲true ...這裏是代碼:

//Routes 
AccountsTemplates.configureRoute('changePwd'); 
AccountsTemplates.configureRoute('enrollAccount'); 
AccountsTemplates.configureRoute('forgotPwd'); 
AccountsTemplates.configureRoute('resetPwd'); 
AccountsTemplates.configureRoute('signIn'); 
AccountsTemplates.configureRoute('signUp'); 
AccountsTemplates.configureRoute('verifyEmail'); 

// Options 


AccountsTemplates.configure({ 


    defaultLayout: 'layout', 
    showForgotPasswordLink: true, 
    overrideLoginErrors: true, 
    enablePasswordChange: true, 
    sendVerificationEmail: false, 

    //enforceEmailVerification: true, 
    //confirmPassword: true, 
    //continuousValidation: false, 
    //displayFormLabels: true, 
    //forbidClientAccountCreation: false, 
    //formValidationFeedback: true, 
    //homeRoutePath: '/', 
    //showAddRemoveServices: false, 
    //showPlaceholders: true, 

    negativeValidation: true, 
    positiveValidation:true, 
    negativeFeedback: false, 
    positiveFeedback:true, 

    // Privacy Policy and Terms of Use 
    //privacyUrl: 'privacy', 
    //termsUrl: 'terms-of-use', 
}); 

AccountsTemplates.configure({ 
    showLabels: true, 
    negativeValidation: true, 
    negativeFeedback: true 
}); 


AccountsTemplates.addField({ 
    _id: "username", 
    type: "text", 
    displayName: "username", 
    required: true, 
    minLength: 5, 
}); 

AccountsTemplates.removeField('email'); 
AccountsTemplates.addField({ 
    _id: 'email', 
    type: 'email', 
    required: true, 
    displayName: "email", 
    re: /[email protected](.+){2,}\.(.+){2,}/, 
    errStr: 'Invalid email', 
}); 

AccountsTemplates.removeField('password'); 
AccountsTemplates.addField({ 
    _id: 'password', 
    type: 'password', 
    required: true, 
    minLength: 6, 
    re: /(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,}/, 
    errStr: 'At least 1 digit, 1 lowercase and 1 uppercase', 
}); 

任何幫助

日Thnx

回答

2

試着在你的文件移動AccountTemplates.configure前AccountTemplates.configureRoute。還要確保客戶端和服務器都可以訪問任何文件。

+0

感謝這使它工作,我只是把AccountTemplates.configureRoute我按照你的建議的代碼底部 – Adam