ReferenceError: require is not defined .js
Unsolved
Language Bindings
-
wrote on 31 Aug 2018, 06:41 last edited by
Hello,
I'm trying to use var fpcalc = require("fpcalc") on my .js in qt creator but I got this error.
How can I solve that please
Philippe
-
Hello,
I'm trying to use var fpcalc = require("fpcalc") on my .js in qt creator but I got this error.
How can I solve that please
Philippe
wrote on 31 Aug 2018, 08:53 last edited by -
wrote on 27 Aug 2024, 11:20 last edited by
@JonB this is not related to JS import requires module .
The code snippet is correct but when we try to use the other modules using require() code qt provides this error . such that qt have some restriction with QJSEngine .
We are allowed only to write some base scripts , but we cannot execute all modules of JS in qt JS -
wrote on 28 Aug 2024, 07:50 last edited by
6 years later
you ok, dude?