Something strange is happening compiling HelloWorld tutorial



  • Hi. I hope someone can help me. I've been struggling with something weird trying to compile the HelloWorld tutorial.
    First of all, I create the project:
    0_1537166423237_e4a544b3-dcdc-45ce-b96e-fd3734fcf357-image.png

    VSCode opens the project and this error appears:
    0_1537166465969_fa883049-20e9-4a10-90e2-7d83d72e8d07-image.png

    And when I click "Show Error" this is what appears:
    0_1537166507023_cf297a62-ec0b-4a0f-b467-2c5c91391132-image.png

    I tried restarting the language server.
    0_1537166578208_5238d77d-a8ba-4daa-8c8e-bfc9c375e252-image.png

    But the error still occurs. Despite this, the completion still works.
    0_1537166784741_9763ccb5-2d76-4ecf-8f95-b404d4f1a443-image.png

    So I try to build, using Ctrl + Shift + B.
    0_1537166878083_0e374cbd-a00f-4058-90ab-e736b260e360-image.png

    And oh my god, this wasn't even what was happening the first three times I tried this, but now this is what pops out:
    0_1537167026868_139c92bb-42c9-4a50-bd54-136974363a34-image.png

    But okay, after that I tried restarting the language server and it seems it helped, but, my initial problem was this:
    0_1537167137131_b4e0d11e-fd70-4264-b821-ec3de0145233-image.png

    Usually the first time I try to debug with Neko works fine, the Hello World appears. But if I change the target for any other one (like Flash or Windows), and then go back to Neko that's what happens, and the VSCode says that it's still building:
    0_1537167226532_f9de0cc8-c763-452f-80db-7c4e0b0fd52f-image.png

    Even though the black window's there and the application cursor doesn't even appear.
    But if I go out and try to test it from the cmd it does work!
    0_1537167419279_fe98ca6b-f15e-4f98-a6e2-8261b560390f-image.png
    0_1537167403541_08f7e6f1-f8e0-4931-a63b-faa0c664caea-image.png

    So, I don't know, what's going on? How can I fix the build?

    I tried making a new project, again, and built it succesfully:
    0_1537168511939_d6d41763-f34a-4021-a4b5-a69db16ceba5-image.png

    But, let's try changing the target build to Html5:
    The cache error appears again.
    0_1537168601404_8b83b479-8121-4c6f-8954-f2c48926af63-image.png

    When I compile the Html5, the app deploys normally into the web browser.
    BUT! If I go back and change the target to Neko, the black window is what I get now. Even If I restart VSCODE. It's like the project it's trapped like that now. Even If I restart the language server. In "output" I get this:
    0_1537170104553_04781a57-9375-417a-b93b-70c2bf980996-image.png


  • administrators

    The ApplicationMain not found error happens when you haven't built for the selected target yet (see https://github.com/openfl/lime-vscode-extension/issues/44). As the warning says, it doesn't meant that completion won't work, just that it will be slower than it could be.

    I think the black screen when building through VSCode and the "invalid field access" error were since fixed in Lime by this commit. However, it hasn't made it into a release yet. So to avoid that, you could either downgrade to the previous Lime / OpenFL versions or update to a dev version of Lime. Adding this to your settings.json should work as a workaround as well:

    "haxe.enableCompilationServer": false
    


  • Hi Gama11.~ Thank you for answering. Modifying the settings.json makes it work.
    As it could be annoying to modify the file for every project, I tried downgrading Lime and OpenFl.

    0_1537213421299_bf8235ee-81d1-45ea-9afd-efa635f4c9e2-image.png

    And it seems it's working! I picked the 8.3.0 version for OpenFl and the 6.4.0 for Lime as those were the most downloaded versions for each one:

    https://lib.haxe.org/p/lime/versions/
    https://lib.haxe.org/p/openfl/versions/

    Thank you so much.


Log in to reply
 

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.