question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue creating nodes

See original GitHub issue

I’m trying to create a node but from a request but I get an error in regards to .toLowerCase of undefined

here is my function code:

`exports.createUser = async(req, res) => { const { email, password, first_name, last_name } = req.body;

try {
    await neode.create('User', {
        email: email,
        password: password,
        first_name: first_name,
        last_name: last_name
    }).then(results => {
        res.status(201).json({
            message: "User created successfully"
        })
    })
}
catch (err) {
    console.log(err)
}

};`

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
adam-cowleycommented, May 29, 2020

Ahhh…the type is a string and not a type like String:

module.exports = { 
  labels: ['User'], 
  id: { type: 'uuid', primary: true }, 
  first_name: 'string', 
  last_name: 'string', 
  email: {type: 'string', unique: true },
  password: 'string' 
};

I’ve added the unique bit in there for you too.

I need to do a better job of validating these schemas when neode loads them

0reactions
taylor009commented, May 28, 2020

yeah here it is @adam-cowley

module.exports = { labels: ['User'], id: { type: 'uuid', primary: true }, first_name: String, last_name: String, email: String, password: String };

I can give you access to the repo if you would like to investigate further.

also, the email property will become unique as well

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating Nodes - Node-RED
Creating Nodes. The main way Node-RED can be extended is to add new nodes into its palette. Nodes can be published as npm...
Read more >
Fix "Problem updating node" errors in Zaps - Zapier Help
The "Problem updating node" error usually occurs if you have security software like an anti-virus program or a pop-up blocker in your ...
Read more >
Creating nodes locally - R3 Documentation
There are two ways you can create a node locally: Manually: create a local directory, add the relevant node and CorDapp files, and...
Read more >
Troubleshooting - n8n Documentation
Error message: 'There was a problem loading init data: API-Server can not be reached. It is probably down'#. Check that the names of...
Read more >
Top 10 Most Common Node.js Developer Mistakes - Toptal
The Top 10 Most Common Mistakes That Node.js Developers Make · Mistake #1: Blocking the event loop · Mistake #2: Invoking a Callback...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found