Windows 10 openfl command caues: Could not find haxelib "openfl"

Running:

C:\Users\Markavian\Work\Local\project\code>openfl test flash

Results in:

Error: Could not find haxelib “openfl”, does it need to be installed?

Using Windows 10, sometime after the Windows 8 -> Windows 10 upgrade.

Previously openfl setup completed successfully.

More information:

C:\Users\Markavian\Work\Local\project\code>haxelib list
actuate: [1.8.6]
box2d: [1.2.3]
hxcpp: [3.2.205]
layout: [1.2.1]
lime-samples: [2.6.0]
lime: [2.9.1]
openfl-samples: [3.3.1]
openfl: [3.6.1]
swf: [2.2.0]

Removed haxe, neko, the haxelib folder. Did a fresh install of everything. Same problem. Can’t help but think its an environment variable problem, but don’t know what or where to look.

The plain openfl command on its own runs fine:

C:\Users\Markavian\Work\Local\project\code>openfl

 .d88 88b.                             888888b 888
d88P" "Y88b                            888     888
888     888                            888     888
888     888 88888b.   .d88b.  88888b.  8888888 888
888     888 888 "88b d8P  Y8b 888 "88b 888     888
888     888 888  888 88888888 888  888 888     888
Y88b. .d88P 888 d88P Y8b.     888  888 888     888
 "Y88 88P"  88888P"   "Y8888  888  888 888     "Y888P
            888
            888

OpenFL Command-Line Tools (3.6.1-LQBZc4)
Use openfl setup to configure platforms or openfl help for more commands
Use -Dv2 or -Dlegacy with your commands to use OpenFL 2.x legacy mode

~

I’ve got openfl working with the DisplayingABitmap example from a separate Windows 10 machine, and also by switching user accounts on the problem machine. This would seems to confirm my theory that its an environment variable problem. I’ve ran env from the command line, but the pertinent Haxe variables seem to be identical.

env
HAXEPATH=C:\HaxeToolkit\haxe
NEKO_INSTPATH=C:\HaxeToolkit\neko
PATH=/c/HaxeToolkit/haxe/:/c/HaxeToolkit/neko

  • PATH cut short

Still unsure.

Maybe try running

lime test flash

Check your haxe install folder where the haxelib.exe is as that’s where the exe is usually installed.

If it’s not there try running

haxelib run openfl setup

lime test flash

Returned:

Error: Could not find haxelib "openfl", does it need to be installed?

haxelib run openfl setup

Returned:

lime is up to date
hxcpp is up to date
lime-samples is up to date
openfl-samples is up to date
actuate is up to date
box2d is up to date
layout is up to date
swf is up to date

I think the haxe and haxelib installations are probably fine, but something is interfering with openfl.

In your haxe/lib/openfl folder there should be a file called .current. Check that the version number in this file also has a matching folder in the same directory. The folder will be named with commas instead of dots.

hi
there are find the solution

if not