Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue creating a user, lesson 15 #9

Open
barbier opened this issue Oct 9, 2018 · 0 comments
Open

Issue creating a user, lesson 15 #9

barbier opened this issue Oct 9, 2018 · 0 comments

Comments

@barbier
Copy link

barbier commented Oct 9, 2018

Hello!
During lesson 15 I believe to have followed all the instructions correctly, but when I try to create a user, I get the following errors, both on terminal and browser:
/home/barbier/.meteor/packages/meteor-tool/.1.6.1.ovpzey.y0lrn++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node: symbol lookup error: /home/barbier/Documents/Projetos/leveluptuts-meteor/node_modules/bcrypt/lib/binding/bcrypt_lib.node: undefined symbol: _ZN4node19GetCurrentEventLoopEPN2v87IsolateE => Exited with code: 127 => Your application is crashing. Waiting for file change.

SyntaxError: JSON.parse: unexpected character at line 2 column 1 of the JSON data - socket-stream-client.js:2810:20 Source map error: SyntaxError: JSON.parse: unexpected character at line 2 column 1 of the JSON data

My Component code:

import { Accounts } from "meteor/accounts-base"

export default class RegisterForm extends React.Component {
    registerUser = e => {
        e.preventDefault()

        Accounts.createUser(
            {
                email: this.email.value,
                password: this.password.value,
            },
            error => {
                console.log(`Error registering user: ${error}`)
            }
        )
    }

    render() {
        return <form onSubmit={this.registerUser}>
            <input
                type="email"
                ref={input => this.email = input}
                placeholder="Your email"
            />
            <input
                type="password"
                ref={input => this.password = input}
                placeholder="Desired password"
            />
            <button type="submit">Register User</button>
        </form>
    }
}```

Can you help me?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant