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.

Uncaught TypeError: _this.convert is not a function

See original GitHub issue

[Enter steps to reproduce:]

  1. Downloaded package
  2. Tried running midi:convert
  3. Searched the code, where do I find convert?

Atom: 1.35.1 x64 Electron: 2.0.18 OS: linux 5.0.4-200.fc29.x86_64 Thrown From: midi-controller-css package 1.2.0

Stack Trace

Uncaught TypeError: _this.convert is not a function

At /home/rui/.var/app/io.atom.Atom/data/packages/midi-controller-css/lib/index.js:22

TypeError: _this.convert is not a function
    at HTMLElement.midiConvert (/packages/midi-controller-css/lib/index.js:22:40)
    at CommandRegistry.handleCommandEvent (/app/share/atom/resources/app/static/<embedded>:11:350055)
    at Object.didConfirmSelection (/app/share/atom/resources/app/static/<embedded>:11:692962)
    at SelectListView.confirmSelection (/app/share/atom/resources/app/static/<embedded>:11:858354)
    at HTMLDivElement.core:confirm (/app/share/atom/resources/app/static/<embedded>:11:853233)
    at CommandRegistry.handleCommandEvent (/app/share/atom/resources/app/static/<embedded>:11:350055)
    at KeymapManager.t.exports.KeymapManager.dispatchCommandEvent (/app/share/atom/resources/app/static/<embedded>:11:1230796)
    at KeymapManager.t.exports.KeymapManager.handleKeyboardEvent (/app/share/atom/resources/app/static/<embedded>:11:1226930)
    at WindowEventHandler.handleDocumentKeyEvent (/app/share/atom/resources/app/static/<embedded>:11:285234)

Commands

     -2:07.8.0 fuzzy-finder:toggle-file-finder (div.package-detail)
     -2:06.8.0 editor:consolidate-selections (input.hidden-input)
     -2:06.8.0 core:cancel (input.hidden-input)
     -2:06.0 settings-view:open (div.package-detail)
     -2:04.9.0 key-binding-resolver:toggle (div.package-detail)
     -2:02.3.0 core:cancel (div.package-detail)
     -2:00.6.0 settings-view:open (div.package-detail)
     -1:59.1.0 fuzzy-finder:toggle-file-finder (div.package-detail)
  2x -1:56.8.0 core:backspace (input.hidden-input)
     -1:55 editor:consolidate-selections (input.hidden-input)
     -1:55 core:cancel (input.hidden-input)
  6x -1:36.6.0 core:backspace (input.hidden-input)
     -1:16.2.0 window:toggle-menu-bar (div.panels-item)
     -1:09.0 command-palette:toggle (div.panels-item)
     -1:06.5.0 core:confirm (input.hidden-input)
     -1:06.5.0 midi:convert (div.panels-item)

Non-Core Packages

midi-controller-css 1.2.0 

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
dimitrinicolascommented, Apr 4, 2019

I stopped using this package because I started using VS Code approximately a year ago. I just quickly tried it and unfortunately it is not working anymore for me either. For your information, it was ultimately not that useful for writing CSS quickly. This project was more of a technical challenge and curiosity.

You make me want to get back on this project! I’ll try to find the actual issue soon.

I remember that the use of LEDs was very little documented by Korg. The lines of code of this package that you referenced to is a bonus Led animation when the Midi controller is plugged in.

For using Leds, I helped myself with this code: https://github.com/overtone/overtone/blob/master/src/overtone/device/midi/nanoKONTROL2.clj#L133 and the obscure Midi implementation from Korg: https://www.korg.com/tmp/support/download/index.php/manual/0/159/2710/?country=us&page=manual&prodtype=0&prodid=159&fileid=2710. The Korg document help to understand the “magical sysex incantation”. It says to the Korg NanoKontrol how you will want to control Leds states.

Finaly this for loop: https://github.com/dimitrinicolas/midi-controller-css/blob/master/lib/index.js#L75 is creating a basic animation with the controller Leds.

1reaction
dimitrinicolascommented, Apr 3, 2019

Hi!

Thank you for your precise report. It’s been a long time since I’ve used this plugin. I reread my code and I think that this command midi:convert is totally useless, it is an error if this command remained in the code.

I unfortunately wrote this plugin very quickly, there is no configuration, informations message or visible command. Its usage is very basic (if it still works today): it edits CSS files when the editor cursor is inside a CSS selector block.

By example, create this CSS file:

div {
  /* <- Place cursor here */
}

And then try some buttons, sliders and potentiometer on the Midi controller.

Also, this plugin only works with a Korg NanoKontrol 2, make sure that it is well recognized by your computer.

Dimitri

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to call constructor: TypeError: Converter is not a function
TypeError : Converter is not a function. As I see the compiled code is valid ES5 code and should work and I don't...
Read more >
How to Handle JavaScript Uncaught TypeError: “x” is Not a ...
The Javascript TypeError: "x" is not a function occurs when calling a function on a value or object, which is not actually a...
Read more >
TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value...
Read more >
TypeError: then is not a function in JavaScript | bobbyhadz
The "TypeError: then is not a function" error occurs when the then() method is called on a value that is not a promise....
Read more >
JavaScript: Uncaught TypeError: n is not a function
This is a standard JavaScript error when trying to call a function before it is defined. This error occurs if you try to...
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