# Problems with promises in nw.js

**URL:** <https://forums.bitovi.com/t/problems-with-promises-in-nw-js/587>\
**Category:** Uncategorized\
**Created:** [March 26, 2017, 12:37am UTC](https://forums.bitovi.com/t/problems-with-promises-in-nw-js/587 "2017-03-26T00:37:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jfleming](https://avatars.discourse-cdn.com/v4/letter/j/59ef9b/32.png) [@jfleming](https://forums.bitovi.com/u/jfleming)\
**Post date:** [March 26, 2017, 12:37am UTC](https://forums.bitovi.com/t/problems-with-promises-in-nw-js/587/1 "2017-03-26T00:37:02Z")

</div>

There seems to be problems with promises in can.Components and stache templates when using nw.js

The simplest way I can demonstrate the problem is with the following:

app.js

```
const AppViewModel = Map.extend({
  define: {
    message: {
      value: 'Hello World!',
      serialize: false
    },
    title: {
      value: 'NW.js Test',
      serialize: false
    },
	testPromise: {
		value: function() {
			return new Promise(function(resolve, reject) {
				// do nothing
			});
		}
	}
  }
});

```

index.stache

```
<h1>{{message}}</h1>
{{#if testPromise.isResolved}}
Test
{{else}}
Loading...
{{/if}}

```

When running using “donejs develop”, the page will show “Loading…” as expected. When running under nw.js the page will be blank (not even “Hello World!” is displayed)

---

<div class="post-metadata">

**Author:** ![justinbmeyer](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.bitovi.com/justinbmeyer/32/179_2.png) [@justinbmeyer](https://forums.bitovi.com/u/justinbmeyer)\
**Post date:** [March 26, 2017, 10:30am UTC](https://forums.bitovi.com/t/problems-with-promises-in-nw-js/587/2 "2017-03-26T10:30:04Z")

</div>

thanks for reporting! Can you create an issue here: [https://github.com/donejs/donejs-nw](https://github.com/donejs/donejs-nw)
