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.

Update quickstart example so the code does not fail with "Failed to initialize the driver: undefined is not a function"

See original GitHub issue

@esteban-uo unfortunately, the log is not enough to figure out where the error is coming from. Can you edit one file and try again? node_modules/zwave-js/build/lib/driver/Driver.js, edit line 431:

-                    message = `Failed to initialize the driver: ${e instanceof Error ? e.message : String(e)}`;
+                    message = `Failed to initialize the driver: ${e instanceof Error ? e.stack : String(e)}`;

This should give us an idea what is happening.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
AlCalzonecommented, Mar 15, 2021

I guess we could at least show the boilerplate for the callback function.

0reactions
esteban-uocommented, Mar 15, 2021

@AlCalzone looks good actually!

because I just copy paste the quick start, the forEach handler should must have always a function…

[1,2,3].forEach()
Uncaught TypeError: undefined is not a function
    at Array.forEach (<anonymous>)
  driver.controller.nodes.forEach((node) => {
    console.log(node)
  });

doing so, then is ok… shame on me! maybe for other dummies might be helpful to update the docu at least that part?

Anyway, thanks a lot! ❤️

Read more comments on GitHub >

github_iconTop Results From Across the Web

MissingDriverError: Wrong driver: "undefined" given. #4068
Hi. What kind of info is needed? I have the same issue and the KillerCodeMonkey solution did not work for me. Now, when...
Read more >
Complete guide to using TypeORM and TypeScript for data ...
js projects, we first use npm init or yarn init to initialize the directory, and do other initialization. What we're initializing is a...
Read more >
Getting started with continuous integration for Nest.js APIs
Learn how to build RESTful APIs with Nest.js, a Node.js framework built with TypeScript, and automate testing using CircleCI.
Read more >
Having trouble connecting to MongoClient before calling ...
The error is suggesting that the program is invoking the mongo.db("main") before the connecting to the server at mongo.connect(...) . This is ...
Read more >
Getting started with Google Test (GTest) on Ubuntu
In the following code, we create two tests that test the function using a ... If I separate the main test from the...
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