vscode-code-runner icon indicating copy to clipboard operation
vscode-code-runner copied to clipboard

command 'code-runner.run' not found

Open yuanjun-liu opened this issue 8 years ago • 56 comments

One day, I open my vscode but find that the code cannot run any more, and I got a error "command 'code-runner.run' not found".

yuanjun-liu avatar Mar 10 '18 12:03 yuanjun-liu

Could you try to reinstall the Code Runner extension?

formulahendry avatar Mar 11 '18 10:03 formulahendry

thanks,now it runs well.

yuanjun-liu avatar Mar 15 '18 01:03 yuanjun-liu

Good to know~

formulahendry avatar Mar 18 '18 11:03 formulahendry

@formulahendry ,I did try everything - reinstall Code Runner several times, add the default settings, etc, but still getting the error 'command 'code-runner.run' not found'. I ma testing it with simple app.js file with 2 console.logs in in and every time I press Code Run button I am getting this error. When I try with Ctr+Alt+N I am getting the same error too :command 'code-runner.run' not found. Just for the reference the extension worked perfectly some months ago

VeselinAtanasov avatar Nov 13 '18 07:11 VeselinAtanasov

Having the same issue. Tried Reinstall. I can find no reference to this.

altimmons avatar Dec 09 '18 00:12 altimmons

I am experiencing the same issue as well, after reinstall. Any updates?

cwest28 avatar Mar 30 '19 06:03 cwest28

update: Solution found in another thread

Please delete the C:\Users*.vscode\extensions\formulahendry.code-runner-* folder and install extension again.

cwest28 avatar Mar 30 '19 17:03 cwest28

update: Solution found in another thread

Please delete the C:\Users***.vscode\extensions\formulahendry.code-runner-*** folder and install extension again.

Not working though.

itsmasud avatar Apr 05 '19 09:04 itsmasud

Same issue here. Any update?

GuoweiYang19891101 avatar Apr 11 '19 18:04 GuoweiYang19891101

I have the same problem.-19-6-1

zlzzq avatar Jun 02 '19 10:06 zlzzq

I have same issue,have any solution to deal with it?

KimberlyZou avatar Jun 03 '19 08:06 KimberlyZou

I have the same problem.-19-6-1

I delete all of my extension and downland the latest version of VsCode, then cover the last version file. It works well now, but I don't know why.

zlzzq avatar Jun 03 '19 08:06 zlzzq

发生这个问题的原因是micromatch引起的, 请尝试打开formulahendry.code-runner-0.9.10/out/src/codeManager.js 把以下位置的代码注释掉,禁用micromatch。保存然后重新打开编辑器。问题解决!

line 12: //const micromatch = require("micromatch");

line 225~236:

/* if (executor == null) { const executorMapByGlob = this._config.get("executorMapByGlob"); if (executorMapByGlob) { const fileBasename = path_1.basename(this._document.fileName); for (const glob of Object.keys(executorMapByGlob)) { if (micromatch.isMatch(fileBasename, glob)) { executor = executorMapByGlob[glob]; break; } } } } */

juntaosun avatar Jun 04 '19 03:06 juntaosun

@juntaosun I comment those code, and it works well, thanks !

csunny avatar Jun 04 '19 07:06 csunny

@juntaosun Yeah,thanks!

CimXin avatar Jun 05 '19 02:06 CimXin

发生这个问题的原因是micromatch引起的, 请尝试打开formulahendry.code-runner-0.9.10/out/src/codeManager.js 把以下位置的代码注释掉,禁用micromatch。保存然后重新打开编辑器。问题解决!

line 12: //const micromatch = require("micromatch");

line 225~236:

/* if (executor == null) { const executorMapByGlob = this._config.get("executorMapByGlob"); if (executorMapByGlob) { const fileBasename = path_1.basename(this._document.fileName); for (const glob of Object.keys(executorMapByGlob)) { if (micromatch.isMatch(fileBasename, glob)) { executor = executorMapByGlob[glob]; break; } } } } */

it works, thx

Craig-Cheng avatar Jun 06 '19 09:06 Craig-Cheng

发生这个问题的原因是micromatch引起的, 请尝试打开formulahendry.code-runner-0.9.10/out/src/codeManager.js 把以下位置的代码注释掉,禁用micromatch。保存然后重新打开编辑器。问题解决!

line 12: //const micromatch = require("micromatch");

line 225~236:

/* if (executor == null) { const executorMapByGlob = this._config.get("executorMapByGlob"); if (executorMapByGlob) { const fileBasename = path_1.basename(this._document.fileName); for (const glob of Object.keys(executorMapByGlob)) { if (micromatch.isMatch(fileBasename, glob)) { executor = executorMapByGlob[glob]; break; } } } } */

Thanks a million, works again.

phith0n avatar Jun 08 '19 14:06 phith0n

@juntaosun That's interesting.. How do you find it is the problem of micromatch?

formulahendry avatar Jun 08 '19 23:06 formulahendry

发生这个问题的原因是micromatch引起的, 请尝试打开formulahendry.code-runner-0.9.10/out/src/codeManager.js 把以下位置的代码注释掉,禁用micromatch。保存然后重新打开编辑器。问题解决! line 12: //const micromatch = require("micromatch"); line 225~236: /* if (executor == null) { const executorMapByGlob = this._config.get("executorMapByGlob"); if (executorMapByGlob) { const fileBasename = path_1.basename(this._document.fileName); for (const glob of Object.keys(executorMapByGlob)) { if (micromatch.isMatch(fileBasename, glob)) { executor = executorMapByGlob[glob]; break; } } } } */

This Worked!! Thansk a Lot.

Suriya1994 avatar Jun 12 '19 06:06 Suriya1994

Hi All, I am having code runner issue as well. Apologies for asking dumb question but where do you run above code to fix the issue. Thanks

atulkumar323 avatar Jun 27 '19 03:06 atulkumar323