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

TypeError: callback is not a function #465

Closed
bestpika opened this issue Sep 12, 2022 · 9 comments
Closed

TypeError: callback is not a function #465

bestpika opened this issue Sep 12, 2022 · 9 comments
Labels

Comments

@bestpika
Copy link

bestpika commented Sep 12, 2022

What version of this package are you using?

  • v2.1.2

What operating system, Node.js, and npm version?

  • Windows | 10 x64
  • NodeJS | v16.17.0 x64
  • NPM | v8.19.1

What happened?

When I try to use the auto-fix feature of this extension, I get the following error message.

TypeError: callback is not a function
    at c:\Users\...\.vscode-insiders\extensions\standard.vscode-standard-2.1.2\server\out\server.js:667:17

What did you expect to happen?

Are you willing to submit a pull request to fix this bug?

@arimgibson
Copy link

arimgibson commented Sep 19, 2022

Looking into this right now, might be able to submit a PR

Edit: couldn't figure out how to effectively debug the extension with the instructions given in the README, so I'm not going to be able to solve the issue or PR 😞

@theoludwig
Copy link
Contributor

Hello, thanks for your report! @bestpika
I don't have time currently to investigate and fix the issue, but would be happy to review a PR that fixes this.

@theoludwig
Copy link
Contributor

Looking into this right now, might be able to submit a PR

Edit: couldn't figure out how to effectively debug the extension with the instructions given in the README, so I'm not going to be able to solve the issue or PR disappointed

Hey! @arimgibson
The instructions to develop the extension are the README: https://github.com/standard/vscode-standard#how-to-develop.
Feel free to post here what are your problems, so we can help you.
Note that, you should first uninstall the extension, before running your "own" develop build of the extension.
Thanks for your interest to contribute.

@theoludwig theoludwig added the bug label Sep 20, 2022
@arimgibson
Copy link

Thanks @divlo! I'm happy to help if I can get the development figured out 😛

I've followed those instructions and have the repo cloned. However, it appears like VSCode/Node can't attach to the server. I've tried with port 6009 (specified in launch.json) on the command line and get failed to connect, please retry. Firewall is off, although it shouldn't make a difference because both are running on the same computer

@theoludwig
Copy link
Contributor

I tried to reproduce the issue, indeed, there is an error when triggering auto-fix, nevertheless, it seems to work weirdly.
Peek 2022-09-20 17-16

@arimgibson I don't really know what is the issue.
Steps I use to develop the extension:

git clone git@github.com:standard/vscode-standard.git
cd vscode-standard
npm install
code .

Once I'm inside VSCode, I go to the "Run and Debug" tab, and start "Launch Client" task, then another VSCode is opening and I can open any folder, for example, the folder in client/testFixture/standard where I can also do npm install to install standard itself. Hopefully, it helps you to get it working. 😄
Screenshot from 2022-09-20 17-10-06

@arimgibson
Copy link

Hmmm... I'll give the VSCODE debugging another go and will see if I can PR this :)

@holopekochan
Copy link

holopekochan commented Oct 14, 2022

The function in the waterfall has been modified to an async function. However, the auto fix features still work with the error with or without async in line

async function (report: StanardReport | StandardDocumentReport[], callback: any) {

async is add-in
commit 3a6d198

@josegutierro
Copy link
Contributor

+1 with this issue

@theoludwig
Copy link
Contributor

Thank you everyone for your help!
The issue should be resolved since v2.1.3 that just released.
Please reopen an issue if the issue persists. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

5 participants