# FuseJS/ImageTools not working 

**URL:** <https://forums.fusetools.com/t/fusejs-imagetools-not-working/4531>\
**Category:** Bug Reports\
**Created:** [July 20, 2016, 7:47am UTC](https://forums.fusetools.com/t/fusejs-imagetools-not-working/4531 "2016-07-20T07:47:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elmer\_Salazar](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/elmer_salazar/32/181_2.png) [@Elmer\_Salazar](https://forums.fusetools.com/u/Elmer_Salazar)\
**Post date:** [July 20, 2016, 7:47am UTC](https://forums.fusetools.com/t/fusejs-imagetools-not-working/4531/1 "2016-07-20T07:47:38Z")

</div>

Version: 0.22.0 (build 6996) Operating system: OSX El Capitan 10.11.5

In the version 0.22.0 (build 6996) FuseJS/ImageTools not working.

Run the command “uno clean” in the directory of the app but still gives that error

This is the log:

LOG: InternalError: Script error: Name: Fuse.Scripting.Error Error message: require(): module not found: FuseJS/ImageTools File name: LoginPage.js Line number: 2 Source line: var ImageTools = require(“FuseJS/ImageTools”); JS stack trace: [Uno code] at Fuse.Scripting.ScriptModule+RequireContext.Require (System.String id) [0x00000] in :0 at Fuse.Scripting.V8.Marshaller+CallbackWrapper.Call (Fuse.Scripting.V8.Simple.UniqueValueVector args) [0x00000] in :0 at Fuse.Scripting.ScriptModule+RequireContext.Require (System.Object[] args) [0x00000] in :0 LOG: Error: JavaScript error in LoginPage.js line 2. require(): module not found: FuseJS/ImageTools in Fuse.Reactive.JavaScript LOG: InternalError: Script error: Name: Fuse.Scripting.Error Error message: require(): module not found: FuseJS/ImageTools File name: LoginPage.js Line number: 2 Source line: var ImageTools = require(‘FuseJS/ImageTools’); JS stack trace: [Uno code] at Fuse.Scripting.ScriptModule+RequireContext.Require (System.String id) [0x00000] in :0 at Fuse.Scripting.V8.Marshaller+CallbackWrapper.Call (Fuse.Scripting.V8.Simple.UniqueValueVector args) [0x00000] in :0 at Fuse.Scripting.ScriptModule+RequireContext.Require (System.Object[] args) [0x00000] in :0 LOG: Error: JavaScript error in LoginPage.js line 2. require(): module not found: FuseJS/ImageTools in Fuse.Reactive.JavaScript LOG: Ingresa al APP LOG: InternalError: Script error: Name: Fuse.Scripting.Error Error message: require(): module not found: FuseJS/ImageTools File name: LoginPage.js Line number: 3 Source line: var ImageTools = require(“FuseJS/ImageTools”); JS stack trace: [Uno code] at Fuse.Scripting.ScriptModule+RequireContext.Require (System.String id) [0x00000] in :0 at Fuse.Scripting.V8.Marshaller+CallbackWrapper.Call (Fuse.Scripting.V8.Simple.UniqueValueVector args) [0x00000] in

:0 LOG: Error: JavaScript error in LoginPage.js line 3. require(): module not found: FuseJS/ImageTools in Fuse.Reactive.JavaScript:0 at Fuse.Scripting.ScriptModule+RequireContext.Require (System.Object[] args) [0x00000] in :0 at Fuse.Scripting.V8.Marshaller+CallbackWrapper.Call (Fuse.Scripting.V8.Simple.UniqueValueVector args) [0x00000] in :0 LOG: Error: JavaScript error in LoginPage.js line 2. require(): module not found: FuseJS/ImageTools in Fuse.Reactive.JavaScript LOG: InternalError: Script error: Name: Fuse.Scripting.Error Error message: require(): module not found: FuseJS/ImageTools File name: LoginPage.js Line number: 2 Source line: var ImageTools = require(“FuseJS/ImageTools”); JS stack trace: [Uno code] at Fuse.Scripting.ScriptModule+RequireContext.Require (System.String id) [0x00000] in :0 at Fuse.Scripting.ScriptModule+RequireContext.Require (System.Object[] args) [0x00000] in :0 at Fuse.Scripting.V8.Marshaller+CallbackWrapper.Call (Fuse.Scripting.V8.Simple.UniqueValueVector args) [0x00000] in :0 LOG: Error: JavaScript error in LoginPage.js line 2. require(): module not found: FuseJS/ImageTools in Fuse.Reactive.JavaScript LOG: InternalError: Script error: Name: Fuse.Scripting.Error Error message: require(): module not found: FuseJS/ImageTools File name: LoginPage.js Line number: 2 Source line: var ImageTools = require(“FuseJS/ImageTools”); JS stack trace: [Uno code] at Fuse.Scripting.ScriptModule+RequireContext.Require (System.String id) [0x00000] in :0 at Fuse.Scripting.ScriptModule+RequireContext.Require (System.Object[] args) [0x00000] in

---

<div class="post-metadata">

**Author:** ![Anders\_Bondehagen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_bondehagen/32/98_2.png) [@Anders\_Bondehagen](https://forums.fusetools.com/u/Anders_Bondehagen)\
**Post date:** [July 20, 2016, 9:10am UTC](https://forums.fusetools.com/t/fusejs-imagetools-not-working/4531/2 "2016-07-20T09:10:19Z")

</div>

Did you add a project reference to it?

---

<div class="post-metadata">

**Author:** ![Elmer\_Salazar](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/elmer_salazar/32/181_2.png) [@Elmer\_Salazar](https://forums.fusetools.com/u/Elmer_Salazar)\
**Post date:** [July 20, 2016, 11:45am UTC](https://forums.fusetools.com/t/fusejs-imagetools-not-working/4531/3 "2016-07-20T11:45:23Z")

</div>

Yes, this is the .unoproj content:

{ “RootNamespace”:"", “Packages”: [“Fuse”, “FuseJS”, “Fuse.ImageTools”], “Includes”: [“\*”] }

---

<div class="post-metadata">

**Author:** ![Andreas\_Ronning](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/andreas_ronning/32/303_2.png) [@Andreas\_Ronning](https://forums.fusetools.com/u/Andreas_Ronning)\
**Post date:** [July 26, 2016, 10:42am UTC](https://forums.fusetools.com/t/fusejs-imagetools-not-working/4531/4 "2016-07-26T10:42:03Z")

</div>

Did you add the Fuse.ImageTools reference to the unoproj while the preview was running?

---

<div class="post-metadata">

**Author:** ![Alejandro\_Cabrera](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/alejandro_cabrera/32/633_2.png) [@Alejandro\_Cabrera](https://forums.fusetools.com/u/Alejandro_Cabrera)\
**Post date:** [October 13, 2016, 11:08pm UTC](https://forums.fusetools.com/t/fusejs-imagetools-not-working/4531/5 "2016-10-13T23:08:43Z")

</div>

Help! got the same problem, i did add the Fuse.ImageTools before preview running but displays nothing.

imageTest.unoproj

```javascript
{
  "RootNamespace":"",
  "Packages": [
  	"Fuse",
  	"FuseJS",
  	"Fuse.ImageTools"
  ],
  "Includes": [
    "*"
  ]
}

```

MainView.ux

```auto
<App>
	<JavaScript>
    var ImageTools = require("FuseJS/ImageTools");
    var Observable = require("FuseJS/Observable");

    var imagePath = Observable();
    var base64Image = "iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPAQMAAAABGAcJAAAABlBMVEX9//wAAQATpOzaAAAAH0l" +
                        "EQVQI12MAAoMHIFLAAYSEwIiJgYGZASrI38AAAwBamgM5VF7xgwAAAABJRU5ErkJggg==";
    ImageTools.getImageFromBase64(base64Image)
    .then(function(image) {
        imagePath.value = image.path;
    });

    module.exports = { test: new Date().toString(), image: imagePath };
</JavaScript>
<Image File="{image}" />

</App>

```

What am i doing wrong? this is the exact example from the documentation. BTW i did not know that i have to put Fuse.ImageTools in my unoproj file, there says nothing of that in the documentation.

---

<div class="post-metadata">

**Author:** ![remnnis\_scion](https://avatars.discourse-cdn.com/v4/letter/r/a9a28c/32.png) [@remnnis\_scion](https://forums.fusetools.com/u/remnnis_scion)\
**Post date:** [October 16, 2016, 9:00am UTC](https://forums.fusetools.com/t/fusejs-imagetools-not-working/4531/6 "2016-10-16T09:00:02Z")

</div>

I am using fuse v0.27 and though it does not crash, it also does not show any image in the desktop live preview but on the device it displays the image quite well.

---

<div class="post-metadata">

**Author:** ![Andreas\_Ronning](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/andreas_ronning/32/303_2.png) [@Andreas\_Ronning](https://forums.fusetools.com/u/Andreas_Ronning)\
**Post date:** [October 17, 2016, 3:50am UTC](https://forums.fusetools.com/t/fusejs-imagetools-not-working/4531/7 "2016-10-17T03:50:17Z")

</div>

ImageTools actually uses mobile only implementations for base64 encode/decode with no local desktop fallback yet. This is on my to-do list, sorry about this not being clear!

For future reference, use the `catch` method on the promise to get the error message.
