Critical Bug/Error: FuseJS Models require() and .unoproj file

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!!

Hi Francesco,

tested and indeed, there is nothing wrong with your code. Storage works just fine for me here.

I should point out that the error you are getting has absolutely nothing to do with Fuse Models feature, since you’re essentially not using it at all.

The only thing that I find suspicious is the .js include in your .unoproj file, which I suggest you change to this: "**.js:Bundle".

Following the change, run uno clean in your project root folder, rebuild the project and see if that helps. If it doesn’t, please post a complete reproduction that reliably triggers the issue (a .zip of your project could work).

Hi Uldis, I tested “**.js:Bundle” in my .unoproj file but it gives me the same problem. Here’s the .zip of the project. Hope you can help me

https://drive.google.com/open?id=1qz9KoVs6rh3-RWue32zqa1J2SyXSeyro

Uldis sorry, the problem is solved! I re-created the project with the same files and now it works fine. Thanks!