Fuse version = 1.8.1 (build 15610)
Operating system version = Windows 7 x64 SP1
Project.unoproj
{
"RootNamespace":"",
"Packages": [
"Fuse",
"FuseJS"
],
"Includes": [
"*",
"App/*.js:Bundle"
]
}
MainView.ux
<App Background="#24211e">
<JavaScript File="MainView.js"/>
<Router ux:Name="router"/>
</App>
MainView.js
var Controllers = require("App/Controllers");
console.log(Controllers.getToken());
module.exports = {
};
App/Controller.js
var Auth = require("App/Auth");
module.exports = {
getToken: function(){
return Auth.login('Francesco');
}
};
App/Auth.js
var Config = require("App/Config");
var Observable = require("FuseJS/Observable");
var Storage = require("FuseJS/Storage");
var FileSystem = require("FuseJS/FileSystem");
var Environment = require("FuseJS/Environment");
function login(name){
console.log(name+Config.Surname);
}
module.exports = {
login : login
};
App/Config.js
var Surname="Calculli";
module.exports = {
Surname: Surname
};
Hi! We have reduced a lot the code to make it easier. So, the problem is that when I require a FuseJS model console log gives me the same error, like this:
[Viewport]: Error: : Uncaught require(): module not found: FuseJS/Storage in Fuse.Scripting.DiagnosticSubject<App/Auth.js:4>
but there is nothing wrong with the code… help me please!!