LightningCLI bugs

I can’t tell that Lightning-CLI is project in good condition. Last two releases are unfortunately unusable. Version 2.7.0 is too slow when producing development builds and as usually there are massive errors. And build it self is not possible run even on latest Chrome. Let’s open this topic guys.

Hi @JanSunavec . What errors are you specifically facing?

The only “bad” experience I had so far is that this latest CLI update is forcing the build to fail if for any reason the build process is emitting any warning. In my case, we were using a 3rd party provided code which used apply and according to Roll-up that’s a BIG no no. However, it was just a warning but this latest update is activating a flag that even for warnings the build fails.

@JanSunavec what exact errors are you encountering? We’ve verified different apps and they all compile and run in the latest Chrome. A build issue related to Axios and a Rollup plugin has been reported here (Invalid bundle when app creates Axios Instances. · Issue #156 · rdkcentral/Lightning-CLI · GitHub), which could be similar to what you are experiencing? This fix is scheduled for release later today.

If you face any other issue, please provide us with some more details and we’ll be happy to look into it!

@eduardo.guzman our latest 2.7.0 release from last week introduces an environment variable to control this behaviour (LNG_BUILD_FAIL_ON_WARNINGS), see: Lightning-CLI/CHANGELOG.md at master · rdkcentral/Lightning-CLI · GitHub

Does this solve your issue?

1 Like

Well, this is error from console. (npm run dev). As you can see. Error starts at very beginning.

startApp.js:275 loadJS ./lib/lightning.js
startApp.js:275 loadJS ./appBundle.js
appBundle.js:22690 Uncaught ReferenceError: regeneratorRuntime is not defined
at appBundle.js:22690
at appBundle.js:22719
at appBundle.js:22760
at appBundle.js:50865
startApp.js:105 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘default’)
at startApp.js:105
at startApp.js:328

​It’s related to version 2.7.0.

Second issue is speed. Version 2.7.0 added new build settings and right now build has over 2 MB in about 10 seconds. Build 2.5.1 produce 1.4 MB in just a second.

As for the speed of creating builds; i suggest taking a look at: LightningJS.io - Documentation

by setting LNG_BUNDLER: esbuild your app will be bundled with esbuild instead of rollup and this will increase your buildtime.

https://esbuild.github.io/

1 Like

Thanks for sharing this amazing information.