An error occurs after adding <haxelib name="id.net.wrapper" />

Trying to use id.net.wrapper (http://lib.haxe.org/p/id.net.wrapper/) in my project, but after adding in application.xml an error occurs: …openfl/display/Sprite.hx:230: characters 0-16 : Module flash.display.Sprite does not define type Sprite. How to fix it?

On what target does this error occur? Does it work in another target?

This library only for flash & javaScript. This error of compiler occurs when targeting flash.

What version of OpenFL? …and if you’re on Windows, does “C:\HaxeToolkit\haxe\std\flash\display\Sprite.hx” exist?

version is 3.3.1. Sprite.hx exists.

Maybe the extra dots in the name mess up the Haxe build HXML.

Could you run openfl display flash and see what it outputs?

-main ApplicationMain
-cp C:/HaxeToolkit/lib/id,net,wrapper/0,0,1
-D id.net.wrapper=0.0.1
-cp C:/HaxeToolkit/lib/jQueryExtern/2,0,4
-D jQueryExtern=2.0.4
-cp C:/HaxeToolkit/lib/openfl-bitfive/3,0,0
-D openfl-bitfive=3.0.0
-cp C:/HaxeToolkit/lib/lime/2,6,0
-D lime=2.6.0
-cp C:/HaxeToolkit/lib/actuate/1,8,6
-D actuate=1.8.6
-cp C:/HaxeToolkit/lib/tilelayer/0,2,0
-D tilelayer=0.2.0
-cp C:/HaxeToolkit/lib/openfl/3,3,1
-D openfl=3.3.1
-cp C:/HaxeToolkit/lib/nape/2,0,19
-D nape=2.0.19
-cp C:/HaxeToolkit/lib/extension-locale/1,0,0
-D extension-locale=1.0.0
-cp src
-D openfl-next
-D tools=2.6.0
-D no-compilation
-D openfl-flash
-D web
-D NAPE_RELEASE_BUILD
-swf-version 11.2
-swf bin/flash/bin/MEGAGUN.swf
-swf-header 800:480:60:000000
-cp bin/flash/haxe

Oh, maybe it’s because of openfl-bitfive. Try and remove that :slight_smile:

How to do it? I don’t add openfl-bitvife to project.xml. Id.net.wrapper inserts it automatically.

Edit id.net.wrapper’s haxelib.json, you can find where it is located with haxelib path id.net.wrapper.

An error has disappeared. In the meantime, check whether the library will work correctly without openfl-bitfive. Thanks for the help.

Openfl-bitfive is a custom html5 backend, so removing it for the flash target shouldn’t affect it.