Lime/Haxe not working with VScode. "Lime completion setup failed."

So I’ve been working with haxe, haxeflixel and lime the last 3-4 months, no problems, now all of a sudden when I try to run lime (ctrl+shift+b) I keep getting the error message “There are task errors. See the output for details.” and in the output it says:
Error: The lime task detection didn’t contribute a task for the following configuration:
{
“type”: “lime”,
“command”: “test”,
“group”: {
“kind”: “build”,
“isDefault”: true
}
}
The task will be ignored.

There’s another error message that pops up that says “Lime completion setup failed. Is the lime command available? Try running ‘lime setup’ or changing the ‘lime.executable’ setting.” and when I check the console errors I get the following:


console.ts:134 [Extension Host] Module C:\Users\Noah.vscode\extensions\wiggin77.codedox-1.2.9\out\codedox.js requires node.js version 4.0.0 or higher
t.log @ console.ts:134
console.ts:134 [Extension Host] (node:15488) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
t.log @ console.ts:134
console.ts:134 [Extension Host] Git installation not found.
t.log @ console.ts:134
notificationsAlerts.ts:40 Lime completion setup failed. Is the lime command available? Try running “lime setup” or changing the “lime.executable” setting.
t.onDidNotificationChange @ notificationsAlerts.ts:40
console.ts:134 [Extension Host] Error: Command failed: lime display flash -debug lime setup
Error: Incorrect number of arguments for command ‘display’

at ChildProcess.exithandler (child_process.js:303:12)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:961:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)

log.ts:161 INFO no standard startup: panel is active
notificationsAlerts.ts:40 Lime completion setup failed. Is the lime command available? Try running “lime setup” or changing the “lime.executable” setting.
t.onDidNotificationChange @ notificationsAlerts.ts:40
console.ts:134 [Extension Host] Error: Command failed: lime display flash -debug lime setup
Error: Incorrect number of arguments for command ‘display’

at ChildProcess.exithandler (child_process.js:303:12)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:961:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)

The program I’ve been working on can still be ran through CMD by “lime run neko” but whenever I change anything in VSCode or directly in the files (removed an image for enemysprites) it seems to change nothing when I run it through CMD, the program seems to run the exact same code/files that were present before all these problems occured.
I haven’t changed anything, deleted anything or done anything that would mess up my setup, the only thing I remember seeing was a VSCode update description window popping up in my file windows and since then these problems have been occuring. The obvious answer I guess would be that some update on VSCode messed up my extensions etc but the problems occoured without me exiting VSCode, one second everything was working fine and then all of a sudden it doesnt work anymore.
I really dont know what to do here I’ve redownloaded lime and openfl through CMD (haxelib setup lime, haxelib setup openfl), tried uninstalling/reinstalling all the extensions, tried uninstalling/reinstalling VSCode yet nothing works.
I’m pretty new to all this, I’ve coded some years back and got back into it around 3-4 months ago and been working on a game the last 2 months and I’d hate to lose all that progress. If anyone has had similar issues or knows some sort of solution please, I’m in desperate need of help here.

1 Like

I’m getting this exact problem. I randomly started happening today. Yesterday my project worked fine and today all I get are errors.

I’ve also tried re-installing everything but no such luck.

This is a bug in the new 1.31.0 release of VSCode, which is currently being looked into:

In the meantime, the workaround is to downgrade to VSCode 1.30.0. :frowning:

Only found 1.30.2 and doesnt seem to run on that version, tried 1.24.0 with no luck either, is 1.30.0 the only one that works currently and if so anywhere I can find a download page?

1.30.2 == 1.30.0 mostly - that’s what I meant. That should work fine, at least for the “task detection” error you were having?

The other error you had is likely unrelated, is the lime command available on the command line?

Yeah the “lime” command works just fine in CMD, says:


Lime Command-Line Tools (7.2.1)
Use lime setup to configure platforms or lime help for more commands


I ran lime setup again yesterday to make sure everything is up to date and have the lime extension aswell as any other haxe related things on vscode and can still run my program through CMD with “lime run neko” while in the projects file but nothing updates when I change the code.
When I try to run my project on 1.30.2 there’s only one error:


Lime completion setup failed. Is the lime command available? Try running “lime setup” or changing the “lime.executable” setting.
t.onDidNotificationChange @ /C:/Users/Noah/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:2508


and when I try and run it it says:


Executing task: lime test neko -debug lime setup --connect 6000 <

Error: Incorrect number of arguments for command ‘test’
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.


Seems to be looking for the file “Error” but I’ve not removed anything it says:
“[tasks] Incorrect number of arguments for command ‘test’ (1, 1).”

Again I’m pretty new to all of this so none of it makes any sense to me…

EDIT: Older projects seem to be working on 1.30.2 just the one I’ve been working on the last 2 months is messy

That’s interesting. Anything different about this one (especially regarding .vscode config files)?

Can’t seem to find any differences, the files are the same and the code is the same in the .json files in the .vscode map

EDIT: Also getting this error text sometimes when I run it:


ERR Cannot read property ‘sendNotification’ of undefined: TypeError: Cannot read property ‘sendNotification’ of undefined
at vshaxe_server_LanguageServer.onDidChangeActiveTextEditor (C:\Users\Noah.vscode\extensions\nadako.vshaxe-2.5.1\bin\client.js:1675:16)
at e.fire (c:\Users\Noah\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:133:218)
at c:\Users\Noah\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:634:804
at e.fire (c:\Users\Noah\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:133:218)
at e.$acceptDocumentsAndEditorsDelta (c:\Users\Noah\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:541:823)
at t._doInvokeHandler (c:\Users\Noah\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:658:837)
at t._invokeHandler (c:\Users\Noah\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:658:509)
at t._receiveRequest (c:\Users\Noah\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:657:126)
at t._receiveOneMessage (c:\Users\Noah\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:656:59)
at c:\Users\Noah\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:653:895
at c:\Users\Noah\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:130:793
at e.fire (c:\Users\Noah\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:133:218)
at a (c:\Users\Noah\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:186:147)
at Socket.n._socketDataListener (c:\Users\Noah\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:186:368)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at Socket.Readable.push (_stream_readable.js:208:10)
at Pipe.onread (net.js:594:20)


and under extension host:


[Extension Host] Error: Command failed: lime display neko -debug lime setup
Error: Incorrect number of arguments for command ‘display’

at ChildProcess.exithandler (child_process.js:287:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.__dirname.ChildProcess._handle.onexit (internal/child_process.js:209:5)

There’s something wrong there, it should only be running lime display neko -debug. Did you by chance enter lime setup into the “Target Flags”? What you input there is persisted to the workspace storage and appended to each lime command.

Try clearing the Target Flags (F1 -> Lime: Edit Target Flags) by deleting whatever the current flags are and pressing enter.

VSCode 1.31 should be okay to use again too now, Joshua released a workaround for the VSCode bug with version 1.2.2 of the Lime extension:

https://marketplace.visualstudio.com/items/openfl.lime-vscode-extension/changelog

1 Like

This worked great, the target flag was “lime setup”, not sure how it happend but that was the issue.
Huge thanks for all the help, really appreciate it, going to bed with a smile on my face :slight_smile:
Also, cheers for 1.31 support!

1 Like

Hey,

So I am currently running VS Code 1.60, and I am getting a similar issue to the one above. When I open my project I get an error saying:

Lime completion setup failed. Is the lime command available? Try running “lime setup” or changing the “lime.executable” setting.

If I click on “Show Full Error” I get this:

src/lime/extension/Main.hx:1019: Error: Command failed: lime display D:\HaxeToolkit\haxe hl -debug
Error: You must have a “project.xml” file or specify another valid project file when using the ‘display’ command

at ChildProcess.exithandler (child_process.js:317:12)
at ChildProcess.emit (events.js:315:20)
at maybeClose (internal/child_process.js:1048:16)
at Socket.<anonymous> (internal/child_process.js:439:11)
at Socket.emit (events.js:315:20)
at Pipe.<anonymous> (net.js:673:12)

Thanks for your help ^w^

Is there a project.xml file in the root folder of your project?

Yeah, the project is a HaxeFlixel project. It came with a Project.xml and yes I also tried renaming it to project.xml and that didn’t work. :sweat_smile:

If it helps, here is the source code: https://github.com/Wolfman13/Haxe-Flixel-Tutorial/tree/Tutorial-31

I got some errors for libraries that weren’t installed, but after I installed them, these are the errors I got:

Failed - try fixing the error(s) and restarting the language server:

source/MeleeMonster.hx:105: characters 12-18 : Unmatched patterns: ANY | NONE | WALL
source/MeleeMonster.hx:119: characters 12-18 : Unmatched patterns: ANY | NONE | WALL
source/Player.hx:148: characters 12-18 : Unmatched patterns: ANY | NONE | WALL
source/Player.hx:162: characters 12-18 : Unmatched patterns: ANY | NONE | WALL
source/Player.hx:178: characters 11-17 : Unmatched patterns: ANY | NONE | WALL
source/BossMonster.hx:193: characters 12-18 : Unmatched patterns: ANY | NONE | WALL
source/BossMonster.hx:207: characters 12-18 : Unmatched patterns: ANY | NONE | WALL

These issues will definitely need to be fixed in your code before VSCode will fully initialize. The Haxe extension does not like starting up when the code already has errors, unfortunately.

I don’t know why you’d be getting the project.xml error, unless it wasn’t in the root of your workspace. For instance, this could happen if you opened the parent directory in VSCode instead.

Oh yeah sorry, I forgot to push the fix to those, but I have fixed them. I always just open the project folder rather than multiple files at a time.

Okay, I made sure that I added a default to all the switch statements so the code works again, but still no intellisense from vs code :sweat_smile:

Okay, now it works for me without any errors. To set up, I ran the following commands:

git clone https://github.com/Wolfman13/Haxe-Flixel-Tutorial.git
cd Haxe-Flixel-Tutorial
git checkout Tutorial-31
code .

This checked out the repo, changed to the same default branch you have on Github, and opened the folder in VSCode.

When code started, code intelligence didn’t work at first, and it gave me these errors:


source/MenuState.hx:64: characters 13-17 : Accessing this field requires a system platform (php,neko,cpp,etc.)
source/PauseMenu.hx:37: characters 68-72 : Accessing this field requires a system platform (php,neko,cpp,etc.)

I switched VSCode from the HTML5/Debug target to the HashLink/Debug target, since that appears to be what you are using. That resolved all errors, and code intelligence started working for me.

By the way, if you still think it could be a case sensitivity issue for your operating system, you could also try changing the lime.projectFile setting in VSCode to “Project.xml”. I don’t know if this will help, but it might be worth a try.