Type not found: lime.systemClipboard when trying to build old version of OpenFL (8.3.0)

I’ve hit a stumbling block on trying to build an old version of OpenFL (8.3.0) by following the README guide, specifically:

npm install
npm run build -s

When running the build step, I get:

../src/openfl/desktop/Clipboard.hx:4: characters 7-28 : Type not found : lime.system.Clipboard

I guess it might have to do with the lime version being no longer compatible but looking at the devDependencies in package.json, it was just pointing to "lime": "openfl/lime#develop", so I wasn’t sure which version of lime to get. Any pointers would be greatly appreciated.

For context, I was attempting to address this OpenFL bug by using the old git bisect strategy, which had regressed between 8.3.0 and 8.4.0 : https://github.com/openfl/openfl/issues/2050 but I’m a newbie to the OpenFL/Lime/Haxe codebase!

I’m sorry about the trouble in rebuilding this version. Perhaps we should think of another way to help match these versions more closely.

It appears that OpenFL 8.3.0 expected Lime 6.4.0, please try that and let me know what you get

Hey singmajesty, thanks for the reply! I guess one way can be to set the version explicitly before tagging it? Although I did try installing it explicitly with

npm install lime@openfl/lime#6.4.0

But it couldn’t find that version (am I specifying it correctly?).

I then tried cloning the Lime repository, checking out the 6.4.0 and then linking to it using the instructions in the OpenFL readme, but when trying to build, I got:

atom:openfl xiaodili$ npm run build -s

## convert-es2015.js...

543 files created

Complete! 543 files were created or modified

## end of convert-es2015.js
    describe: optionsSchema.definitions.output.properties.path.description,

TypeError: Cannot read property 'properties' of undefined
    at module.exports (/Volumes/SecondarySSD/dev/third_party/openfl/node_modules/webpack-cli/bin/config-yargs.js:89:48)
    at /Volumes/SecondarySSD/dev/third_party/openfl/node_modules/webpack-cli/bin/webpack.js:60:27
    at Object.<anonymous> (/Volumes/SecondarySSD/dev/third_party/openfl/node_modules/webpack-cli/bin/webpack.js:515:3)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)

Any idea what I should try next? It’s not a pressing matter anymore though because I managed to work around the new touch event behaviour. I’ll do a bit more poking this weekend :slight_smile:

I had this same error before, I believe it is from updating webpack, but not updating some of its dependencies. There’s one or two libraries that crossed major version boundaries, so NPM does not automatically upgrade them, and it caused this problem. It might have been “webpack-cli” or “webpack-dev-server” in addition to “webpack”

Updating the webpack dependencies seems to have improved things! I’m now getting a different error, although not sure whereabouts it’s coming from:

atom:openfl xiaodili$ npm run build -s
--macro:1: character 0 : Type not found : genjs.Generator

But don’t worry about it as the newest version of OpenFL builds fine and I can also use it for my project!