Skip to content

Issue creating a user, lesson 15 #9

Description

@barbier

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions