Git Product home page Git Product logo

zoid-demo's Introduction

zoid demo

A forkable demo repo for zoid to help you get started.

zoid is a cross-domain component library which helps you render iframes and popups, pass down props, accept callbacks, and much more. This repo sets you up with the best possible starting point for building an xcomponent, including:

  • Predefined webpack, babel, karma etc. configs for working with xcomponent
  • Predefined test-setup, including a mock component frame
  • Predefined demo pages for both iframe and popup components

Useful starting points

Quick Start

Getting Started

  • Fork the module
  • Install: npm install
  • Start editing code in ./src and writing tests in ./tests
  • Build: npm run build

Building

npm run build

Running Demo Server

npm run demo

Deploying

  • Host your bundled xcomponent script somewhere, e.g. https://mysite.com/login.xcomponent.js
  • Set up a public url for your component, e.g. https://mysite.com/login
  • Make sure the login.xcomponent.js is included in the login page, and using window.xprops

Now other sites can include https://mysite.com/login.xcomponent.js on their pages, and render your component!

Tests

  • Edit tests in ./test/tests

  • Run the tests:

    npm run test

Testing with different/multiple browsers

npm run karma -- --browser=PhantomJS
npm run karma -- --browser=Chrome
npm run karma -- --browser=Safari
npm run karma -- --browser=Firefox
npm run karma -- --browser=PhantomJS,Chrome,Safari,Firefox

Keeping the browser open after tests

npm run karma -- --keep-open

Publishing

Before you publish for the first time:
  • Remove the example code in ./src, ./test/tests and ./demo
  • Edit the module name in package.json
  • Edit README.md and CONTRIBUTING.md
Then:
  • Publish your code: npm run release to build and publish a patch version
  • Or npm run release:patch, npm run release:minor, npm run release:major

Notes

  • webpack.config.js is set up to build both iframe and popup versions of your component. Normally this will be overkill and you'll just want to pick one. The reason there's an example of both is, the popup rendering code adds more to the bundle size, so cutting this out can streamline your bundle if you only need iframe support.

  • The karma tests use a mock for the component window (i.e. everything displayed in the popup window or iframe window). This can be seen here. When writing tests which need to consume window.xprops and call callbacks like window.xprops.onLogin(), you'll need to do that here.

  • This module imports from zoid/src rather than zoid/dist, allowing your build to take advantage of tree-shaking, flow-types, etc. from zoid and all of its dependencies. That means that various babel plugins etc. that are required by zoid and its dependencies are included in this module. If this isn't to your liking, you're free to switch to zoid/dist, but be warned that you will lose out on some benefits this way. It will reduce the build time though.

  • This module is forked from grumbler, which gives a solid (but opinionated) default setup for front-end javascript libraries, including webpack, karma, babel, flowtype, etc. You're free to switch out any of these technologies, but the existing setup is likely to give the best compatibility especially given the previous note around importing from zoid/src.

zoid-demo's People

Contributors

bluepnume avatar daton89 avatar jsebrech avatar westeezy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zoid-demo's Issues

NPM scripts fail due to several issues

Expected Behavior

Executing npm scripts should just work without errors!

Current Behavior

Almost all npm scripts are failing when being executed

Possible Solution

Update the project files maybe. There are a lot of deprecated packages when npm install

Steps to Reproduce

  1. Fork into the project
  2. run npm install
  3. run npm run build or npm run test

Detailed Description

When executing npm run build the script fails with:

Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/zoid/src/parent/index.js:135:66

Cannot call tasks.getProxyContainer.then with function bound to onSuccess because property proxyWin is missing in
ZalgoPromise [1] but exists in object type [2] in type argument R [3] of the return value of type argument R [3].

     node_modules/zoid/src/parent/index.js
     132│
     133│             tasks.getProxyContainer = this.getProxyContainer(container);
     134│
     135│             tasks.renderContainer = tasks.getProxyContainer.then(proxyContainer => {
     136│                 return this.renderContainer(proxyContainer, { context, uid });
     137│             });
     138│
     139│             tasks.open = this.driver.renderedIntoContainer
     140│                 ? tasks.renderContainer.then(proxyOutlet => this.open(proxyOutlet))
        :
 [2] 316│     open(proxyOutlet? : ProxyElement) : ZalgoPromise<{ proxyWin : ProxyWindow, proxyFrame? : ProxyElement }> {
        :
 [1] 566│     renderContainer(proxyContainer : ProxyElement, { context, uid } : { context : $Values<typeof CONTEXT>, uid : string }) : ZalgoPromise<ProxyElement> {

     node_modules/zalgo-promise/src/promise.js
 [3]   7│ export class ZalgoPromise<R : mixed> {


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/zoid/src/parent/index.js:139:26

Cannot assign this.driver.renderedIntoContainer ? tasks.renderContainer.then(...) : this.open() to tasks.open because:
 • property proxyWin is missing in String [1] in type argument R [2].
 • property proxyWin is missing in ZalgoPromise [3] but exists in object type [4] in type argument R [2].
 • property proxyWin is missing in ZalgoPromise [3] but exists in object type [4] in type argument R [2].
 • property proxyWin is missing in String [1] in type argument R [2].
 • property proxyWin is missing in ZalgoPromise [3] but exists in object type [4] in type argument R [2].
 • all branches are incompatible:
    • Either undefined [5] is incompatible with ZalgoPromise [6] in type argument R [2] of type argument R [2].
    • Or undefined [5] is incompatible with ZalgoPromise [6] in type argument R [2] of type argument R [2].
 • property proxyWin is missing in ZalgoPromise [3] but exists in object type [4] in type argument R [2] of type
   argument R [2].
 • property proxyWin is missing in String [1] in type argument R [2].
 • property proxyWin is missing in ZalgoPromise [3] but exists in object type [4] in type argument R [2].
 • all branches are incompatible:
    • Either undefined [5] is incompatible with string [1] in type argument R [2] of type argument R [2].
    • Or undefined [5] is incompatible with string [1] in type argument R [2] of type argument R [2].
    • Or undefined [5] is incompatible with ZalgoPromise [6] in type argument R [2].
    • Or undefined [5] is incompatible with ZalgoPromise [6] in type argument R [2].
 • object type [4] is incompatible with string [1] in type argument R [2].
 • property proxyFrame is missing in String [1] in type argument R [2].
 • property proxyWin is missing in ZalgoPromise [3] but exists in object type [4] in type argument R [2].

        node_modules/zoid/src/parent/index.js
    [5]  84│     initPromise : ZalgoPromise<void>
           :
        136│                 return this.renderContainer(proxyContainer, { context, uid });
        137│             });
        138│
        139│             tasks.open = this.driver.renderedIntoContainer
        140│                 ? tasks.renderContainer.then(proxyOutlet => this.open(proxyOutlet))
        141│                 : this.open();
        142│
        143│             tasks.saveProxyWin = tasks.open.then(({ proxyWin }) => {
        144│                 this.proxyWin = proxyWin;
           :
    [1] 206│     buildWindowName({ proxyWin, initialDomain, domain, target, uid, context } : { proxyWin : ProxyWindow, initialDomain : string, domain : string | RegExp, target : CrossDomainWindowType, context : $Values<typeof CONTEXT>, uid : string }) : string {
           :
 [3][4] 316│     open(proxyOutlet? : ProxyElement) : ZalgoPromise<{ proxyWin : ProxyWindow, proxyFrame? : ProxyElement }> {

        node_modules/zalgo-promise/src/promise.js
    [2]   7│ export class ZalgoPromise<R : mixed> {
           :
    [6] 226│     then<X : mixed, Y : mixed>(onSuccess : void | (result : R) => (ZalgoPromise<X> | Y), onError : void | (error : mixed) => (ZalgoPromise<X> | Y)) : ZalgoPromise<X | Y> {


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/zoid/src/parent/index.js:140:61

Cannot call tasks.renderContainer.then with function bound to onSuccess because object type [1] is incompatible with
string [2] in type argument R [3] of the return value.

     node_modules/zoid/src/parent/index.js
     137│             });
     138│
     139│             tasks.open = this.driver.renderedIntoContainer
     140│                 ? tasks.renderContainer.then(proxyOutlet => this.open(proxyOutlet))
     141│                 : this.open();
     142│
     143│             tasks.saveProxyWin = tasks.open.then(({ proxyWin }) => {
        :
 [2] 206│     buildWindowName({ proxyWin, initialDomain, domain, target, uid, context } : { proxyWin : ProxyWindow, initialDomain : string, domain : string | RegExp, target : CrossDomainWindowType, context : $Values<typeof CONTEXT>, uid : string }) : string {
        :
 [1] 316│     open(proxyOutlet? : ProxyElement) : ZalgoPromise<{ proxyWin : ProxyWindow, proxyFrame? : ProxyElement }> {

     node_modules/zalgo-promise/src/promise.js
 [3]   7│ export class ZalgoPromise<R : mixed> {


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/zoid/src/parent/index.js:140:71

Cannot call this.open with proxyOutlet bound to proxyOutlet because:
 • inexact ZalgoPromise [1] is incompatible with exact ProxyElement [2].
 • inexact string [3] is incompatible with exact ProxyElement [2].
 • inexact ZalgoPromise [4] is incompatible with exact ProxyElement [2].

     node_modules/zoid/src/parent/index.js
     137│             });
     138│
     139│             tasks.open = this.driver.renderedIntoContainer
     140│                 ? tasks.renderContainer.then(proxyOutlet => this.open(proxyOutlet))
     141│                 : this.open();
     142│
     143│             tasks.saveProxyWin = tasks.open.then(({ proxyWin }) => {
        :
 [3] 206│     buildWindowName({ proxyWin, initialDomain, domain, target, uid, context } : { proxyWin : ProxyWindow, initialDomain : string, domain : string | RegExp, target : CrossDomainWindowType, context : $Values<typeof CONTEXT>, uid : string }) : string {
        :
 [4] 270│     buildUrl() : ZalgoPromise<string> {
        :
 [2] 316│     open(proxyOutlet? : ProxyElement) : ZalgoPromise<{ proxyWin : ProxyWindow, proxyFrame? : ProxyElement }> {

     node_modules/zalgo-promise/src/promise.js
 [1] 226│     then<X : mixed, Y : mixed>(onSuccess : void | (result : R) => (ZalgoPromise<X> | Y), onError : void | (error : mixed) => (ZalgoPromise<X> | Y)) : ZalgoPromise<X | Y> {


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/zoid/src/parent/index.js:157:24

Cannot call ZalgoPromise.all(...).then with function bound to onSuccess because object type [1] is incompatible with
string [2] in type argument R [3] of the return value.

     node_modules/zoid/src/parent/index.js
     153│                 return proxyWin.setName(windowName);
     154│             });
     155│
     156│             tasks.prerender = ZalgoPromise.all([ tasks.open, tasks.renderContainer ]).then(([ { proxyWin }, proxyOutlet ]) => {
     157│                 return this.prerender(proxyWin, proxyOutlet, { context, uid });
     158│             });
     159│
     160│             tasks.loadUrl = ZalgoPromise.all([ tasks.open, tasks.buildUrl, tasks.setWindowName, tasks.prerender ]).then(([ { proxyWin }, url ]) => {
     161│                 return proxyWin.setLocation(url);
        :
 [2] 206│     buildWindowName({ proxyWin, initialDomain, domain, target, uid, context } : { proxyWin : ProxyWindow, initialDomain : string, domain : string | RegExp, target : CrossDomainWindowType, context : $Values<typeof CONTEXT>, uid : string }) : string {
        :
 [1] 511│     prerender(proxyWin : ProxyWindow, proxyElement : ProxyElement, { context, uid } : { context : $Values<typeof CONTEXT>, uid : string }) : ZalgoPromise<{ proxyPrerenderWin : ProxyWindow, proxyPrerenderFrame : ?ProxyElement }> {

     node_modules/zalgo-promise/src/promise.js
 [3]   7│ export class ZalgoPromise<R : mixed> {


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/zoid/src/parent/index.js:157:49

Cannot call this.prerender with proxyOutlet bound to proxyElement because:
 • inexact ZalgoPromise [1] is incompatible with exact ProxyElement [2].
 • inexact undefined [3] is incompatible with exact ProxyElement [2].
 • inexact string [4] is incompatible with exact ProxyElement [2].
 • inexact ZalgoPromise [5] is incompatible with exact ProxyElement [2].
 • inexact ZalgoPromise [6] is incompatible with exact ProxyElement [2].

     node_modules/zoid/src/parent/index.js
 [3]  84│     initPromise : ZalgoPromise<void>
        :
     154│             });
     155│
     156│             tasks.prerender = ZalgoPromise.all([ tasks.open, tasks.renderContainer ]).then(([ { proxyWin }, proxyOutlet ]) => {
     157│                 return this.prerender(proxyWin, proxyOutlet, { context, uid });
     158│             });
     159│
     160│             tasks.loadUrl = ZalgoPromise.all([ tasks.open, tasks.buildUrl, tasks.setWindowName, tasks.prerender ]).then(([ { proxyWin }, url ]) => {
        :
 [4] 206│     buildWindowName({ proxyWin, initialDomain, domain, target, uid, context } : { proxyWin : ProxyWindow, initialDomain : string, domain : string | RegExp, target : CrossDomainWindowType, context : $Values<typeof CONTEXT>, uid : string }) : string {
        :
 [5] 270│     buildUrl() : ZalgoPromise<string> {
        :
 [6] 316│     open(proxyOutlet? : ProxyElement) : ZalgoPromise<{ proxyWin : ProxyWindow, proxyFrame? : ProxyElement }> {
        :
 [2] 511│     prerender(proxyWin : ProxyWindow, proxyElement : ProxyElement, { context, uid } : { context : $Values<typeof CONTEXT>, uid : string }) : ZalgoPromise<{ proxyPrerenderWin : ProxyWindow, proxyPrerenderFrame : ?ProxyElement }> {

     node_modules/zalgo-promise/src/promise.js
 [1] 226│     then<X : mixed, Y : mixed>(onSuccess : void | (result : R) => (ZalgoPromise<X> | Y), onError : void | (error : mixed) => (ZalgoPromise<X> | Y)) : ZalgoPromise<X | Y> {


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/zoid/src/parent/index.js:164:54

Cannot call tasks.open.then with function bound to onSuccess because:
 • property proxyWin is missing in ZalgoPromise [1] in the first argument.
 • property proxyWin is missing in undefined [2] in the first argument.
 • property proxyWin is missing in String [3] in the first argument.

     node_modules/zoid/src/parent/index.js
 [2]  84│     initPromise : ZalgoPromise<void>
        :
     161│                 return proxyWin.setLocation(url);
     162│             });
     163│
     164│             tasks.watchForClose = tasks.open.then(({ proxyWin }) => {
     165│                 return this.watchForClose(proxyWin);
     166│             });
     167│
     168│             tasks.onDisplay = tasks.prerender.then(() => {
     169│                 return this.props.onDisplay();
        :
 [3] 206│     buildWindowName({ proxyWin, initialDomain, domain, target, uid, context } : { proxyWin : ProxyWindow, initialDomain : string, domain : string | RegExp, target : CrossDomainWindowType, context : $Values<typeof CONTEXT>, uid : string }) : string {

     node_modules/zalgo-promise/src/promise.js
 [1] 226│     then<X : mixed, Y : mixed>(onSuccess : void | (result : R) => (ZalgoPromise<X> | Y), onError : void | (error : mixed) => (ZalgoPromise<X> | Y)) : ZalgoPromise<X | Y> {


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/zoid/src/parent/index.js:172:51

Cannot call tasks.open.then with function bound to onSuccess because:
 • property proxyWin is missing in ZalgoPromise [1] in the first argument.
 • property proxyWin is missing in undefined [2] in the first argument.
 • property proxyWin is missing in String [3] in the first argument.

     node_modules/zoid/src/parent/index.js
 [2]  84│     initPromise : ZalgoPromise<void>
        :
     169│                 return this.props.onDisplay();
     170│             });
     171│
     172│             tasks.openBridge = tasks.open.then(({ proxyWin }) => {
     173│                 return this.openBridge(proxyWin, initialDomain, context);
     174│             });
     175│
     176│             tasks.switchPrerender = ZalgoPromise.all([ tasks.open, tasks.prerender, tasks.init ]).then(([ { proxyFrame }, { proxyPrerenderFrame } ]) => {
     177│                 return this.switchPrerender({ proxyFrame, proxyPrerenderFrame });
        :
 [3] 206│     buildWindowName({ proxyWin, initialDomain, domain, target, uid, context } : { proxyWin : ProxyWindow, initialDomain : string, domain : string | RegExp, target : CrossDomainWindowType, context : $Values<typeof CONTEXT>, uid : string }) : string {

     node_modules/zalgo-promise/src/promise.js
 [1] 226│     then<X : mixed, Y : mixed>(onSuccess : void | (result : R) => (ZalgoPromise<X> | Y), onError : void | (error : mixed) => (ZalgoPromise<X> | Y)) : ZalgoPromise<X | Y> {


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/zoid/src/parent/index.js:176:125

Property proxyPrerenderFrame is missing in undefined [1].

 [1]  84│     initPromise : ZalgoPromise<void>
        :
     173│                 return this.openBridge(proxyWin, initialDomain, context);
     174│             });
     175│
     176│             tasks.switchPrerender = ZalgoPromise.all([ tasks.open, tasks.prerender, tasks.init ]).then(([ { proxyFrame }, { proxyPrerenderFrame } ]) => {
     177│                 return this.switchPrerender({ proxyFrame, proxyPrerenderFrame });
     178│             });
     179│



Found 31 errors

Only showing the most relevant union/intersection branches.
To see all branches, re-run Flow with --show-all-branches
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] flow: `flow`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the [email protected] flow script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/alex/.npm/_logs/2020-07-29T11_05_11_834Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] test: `npm run lint && npm run flow-typed && npm run flow && npm run karma`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the [email protected] test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/alex/.npm/_logs/2020-07-29T11_05_11_904Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build: `npm run test && npm run babel && npm run webpack`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/alex/.npm/_logs/2020-07-29T11_05_11_941Z-debug.log

Any changes between xcomponent-demo & zoid?

Hey guys,

I know you recently renamed the XComponent to Zoid - https://github.com/krakenjs/zoid

Just wanted to verify that nothing has materially changed between this xcomponent demo and Zoid (with latest update to the Zoid repo being 15 days ago and this repo being late November, 2017) before using this as a starting point for a more unified/bundled build of a React component + zoid as outlined at the end of this medium post - https://medium.com/@bluepnume/creating-a-cross-domain-react-component-with-xcomponent-fbcccc4778fd

Specifically, creating a component & bundling it with Zoid to produce my equivalent of:

<script src="https://www.your-site.com/loginComponent.js"></script>
<script>
   MyLoginZoidComponent.render({ ... }, '#container');
</script>

Cheers!

npm run test fails

  1. git clone [email protected]:krakenjs/zoid-demo.git
  2. cd zoid-demo && npm install
  3. npm run build --> fails at npm run test
> npm run lint && npm run flow-typed && npm run flow && npm run karma

npm WARN invalid config loglevel="notice"

> eslint src/ test/ *.js

npm WARN invalid config loglevel="notice"

> rm -rf ./flow-typed && flow-typed install

[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4
• Found 6 dependencies in package.json to install libdefs for. Searching...
• rebasing flow-typed cache...
• Installing 2 libDefs...
  • flow-bin_v0.x.x.js
    └> ./flow-typed/npm/flow-bin_v0.x.x.js
flow-bin
/Users/n/Desktop/repos/zoid-demo/flow-typed/npm
  • mocha_v4.x.x.js
    └> ./flow-typed/npm/mocha_v4.x.x.js
mocha
/Users/n/Desktop/repos/zoid-demo/flow-typed/npm
• Generating stubs for untyped dependencies...
  • grumbler-scripts@^3
    └> flow-typed/npm/grumbler-scripts_vx.x.x.js
  • serve@^10.1.1
    └> flow-typed/npm/serve_vx.x.x.js
  • zoid@^9.0.28
    └> flow-typed/npm/zoid_vx.x.x.js
  • jsx-pragmatic@^1.0.11
    └> flow-typed/npm/jsx-pragmatic_vx.x.x.js

!! No [email protected] libdefs found in flow-typed for the above untyped dependencies !!

We've generated `any`-typed stubs for these packages, but consider submitting 
libdefs for them to https://github.com/flowtype/flow-typed/

npm WARN invalid config loglevel="notice"

> flow

Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/zoid/src/child/index.js:232:16

Cannot return object literal because:
 • property fireAndForget is missing in function [1] but exists in CrossDomainFunctionType [2] in property
   updateProps.
 • property fireAndForget is missing in function [3] but exists in CrossDomainFunctionType [4] in property close.

 [2]  23│     updateProps : CrossDomainFunctionType<[ PropsType<P> ], void>,
 [4]  24│     close : CrossDomainFunctionType<[], void>
        :
     229│
     230│         const self = this;
     231│
     232│         return {
 [1] 233│             updateProps(props : (PropsType<P>)) : ZalgoPromise<void> {
     234│                 return ZalgoPromise.try(() => self.setProps(props, this.__origin__, true));
     235│             },
     236│
 [3] 237│             close() : ZalgoPromise<void> {
     238│                 return ZalgoPromise.try(() => self.destroy());
     239│             }
     240│         };
     241│     }
     242│
     243│     resize({ width, height } : { width : ?number, height : ?number }) : ZalgoPromise<void> {


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/zoid/src/component/component.js:405:12

Cannot return init because:
 • null or undefined [1] is incompatible with P [2] in property xprops.
 • inexact null or undefined [1] is incompatible with exact object type [3] in property xprops.

     node_modules/zoid/src/component/component.js
 [1] 118│     xprops : ?PropsType<P>
        :
     402│     init.canRenderTo = (win) => component.canRenderTo(win);
     403│     init.xprops = component.xprops;
     404│     
     405│     return init;
     406│ }
     407│
     408│ export function destroyAll() : ZalgoPromise<void> {

     node_modules/zoid/src/component/props.js
 [3]  39│ export type PropsType<P> = {|
      40│     timeout? : timeoutPropType,
      41│     window? : ?windowPropType,
      42│     close? : ?closePropType,
      43│     focus? : ?focusPropType,
      44│     resize? : ?resizePropType,
      45│     cspNonce? : ?cspNoncePropType,
      46│
      47│     onDisplay : onDisplayPropType,
      48│     onRendered : onRenderedPropType,
      49│     onRender : onRenderPropType,
      50│     onClose : onClosePropType,
      51│     onError : onErrorPropType,
      52│     onProps : onPropsPropType<P>
 [2]  53│ |} & P;


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/zoid/src/parent/index.js:529:16

Cannot return object literal because:
 • property fireAndForget is missing in function [1] but exists in CrossDomainFunctionType [2] in property checkClose.
 • property fireAndForget is missing in function [3] but exists in CrossDomainFunctionType [4] in property resize.

 [2]  43│     checkClose : CrossDomainFunctionType<[], void>,
 [4]  44│     resize : CrossDomainFunctionType<[{ width? : ?number, height? : ?number }], void>,
        :
 [1] 524│         const checkClose = () => this.checkClose(win);
 [3] 525│         const resize     = ({ width, height }) => this.resize({ width, height });
     526│
     527│         init.onError = onError;
     528│
     529│         return { init, close, checkClose, resize, onError };
     530│     }
     531│
     532│     resize({ width, height } : { width? : ?number, height? : ?number }) : ZalgoPromise<void> {



Found 6 errors

npm ERR! Darwin 18.7.0
npm ERR! argv "/usr/local/Cellar/node/11.11.0/bin/node" "/Users/n/Desktop/repos/zoid-demo/node_modules/.bin/npm" "run" "flow"
npm ERR! node v11.11.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] flow: `flow`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the [email protected] flow script 'flow'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the zoid-demo package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     flow
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test: `npm run lint && npm run flow-typed && npm run flow && npm run karma`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/n/.npm/_logs/2019-08-22T20_55_19_369Z-debug.log

Any ideas?

SyntaxError: missing ) after argument list

When running npm run webpack on zoid-demo with Windows 10, I get the following error:

basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^
SyntaxError: missing ) after argument list

Also happens using WSL. It seems like the solution is to replace the string ./node_modules/.bin/webpack in the package.json command with ./node_modules/webpack/bin/webpack.js

"webpack": "babel-node --plugins=transform-es2015-modules-commonjs ./node_modules/webpack/bin/webpack.js --progress",

(credit: tylingsoft/markdown-plus#89 (comment))

Hope this helps someone trying this out on Windows!

Setup in using Yarn Workspace

How do I use this demo in Yarn workspace because I'm stuck on resolving zoid/src.

Cannot resolve module zoid/src.

Can you advice?

Update to the latest zoid version

This demo project uses version 8 of zoid. This should be updated to the latest version to match the documentation for the project.

unable to run demo

When I run npm run demo I get the following output:

> [email protected] demo C:\digipolis\prototypes\zoid-demo
> echo 'Navigate to http://localhost:1337/demo/iframe/index.htm or http://localhost:1337/demo/popup/index.htm' && serve . --port 1337 --silent

'Navigate to http://localhost:1337/demo/iframe/index.htm or http://localhost:1337/demo/popup/index.htm'
'serve' is not recognized as an internal or external command,
operable program or batch file.

Because of this I'm unable to run the demo.

npm run build failed on v10.16.2

Spawned flow server (pid=89816)
Logs will go to /private/tmp/flow/zSUserszSmcszSDocumentszSzZoid-demo.log
Monitor logs will go to /private/tmp/flow/zSUserszSmcszSDocumentszSzZoid-demo.monitor_log
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/zoid/src/parent/index.js:135:66

Cannot call tasks.getProxyContainer.then with function bound to onSuccess because property proxyWin is missing in
ZalgoPromise [1] but exists in object type [2] in type argument R [3] of the return value of type argument R [3].

     node_modules/zoid/src/parent/index.js
     132│
     133│             tasks.getProxyContainer = this.getProxyContainer(container);
     134│
     135│             tasks.renderContainer = tasks.getProxyContainer.then(proxyContainer => {
     136│                 return this.renderContainer(proxyContainer, { context, uid });
     137│             });
     138│
     139│             tasks.open = this.driver.renderedIntoContainer
     140│                 ? tasks.renderContainer.then(proxyOutlet => this.open(proxyOutlet))
        :
 [2] 316│     open(proxyOutlet? : ProxyElement) : ZalgoPromise<{ proxyWin : ProxyWindow, proxyFrame? : ProxyElement }> {
        :
 [1] 566│     renderContainer(proxyContainer : ProxyElement, { context, uid } : { context : $Values<typeof CONTEXT>, uid : string }) : ZalgoPromise<ProxyElement> {

     node_modules/zalgo-promise/src/promise.js
 [3]   7│ export class ZalgoPromise<R : mixed> {


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/zoid/src/parent/index.js:139:26

Cannot assign this.driver.renderedIntoContainer ? tasks.renderContainer.then(...) : this.open() to tasks.open because:
 • property proxyWin is missing in String [1] in type argument R [2].
 • property proxyWin is missing in ZalgoPromise [3] but exists in object type [4] in type argument R [2].
 • property proxyWin is missing in ZalgoPromise [3] but exists in object type [4] in type argument R [2].
 • property proxyWin is missing in String [1] in type argument R [2].
 • property proxyWin is missing in ZalgoPromise [3] but exists in object type [4] in type argument R [2].
 • all branches are incompatible:
    • Either undefined [5] is incompatible with ZalgoPromise [6] in type argument R [2] of type argument R [2].
    • Or undefined [5] is incompatible with ZalgoPromise [6] in type argument R [2] of type argument R [2].
 • property proxyWin is missing in ZalgoPromise [3] but exists in object type [4] in type argument R [2] of type
   argument R [2].
 • property proxyWin is missing in String [1] in type argument R [2].
 • property proxyWin is missing in ZalgoPromise [3] but exists in object type [4] in type argument R [2].
 • all branches are incompatible:
    • Either undefined [5] is incompatible with string [1] in type argument R [2] of type argument R [2].
    • Or undefined [5] is incompatible with string [1] in type argument R [2] of type argument R [2].
    • Or undefined [5] is incompatible with ZalgoPromise [6] in type argument R [2].
    • Or undefined [5] is incompatible with ZalgoPromise [6] in type argument R [2].
 • object type [4] is incompatible with string [1] in type argument R [2].
 • property proxyFrame is missing in String [1] in type argument R [2].
 • property proxyWin is missing in ZalgoPromise [3] but exists in object type [4] in type argument R [2].

        node_modules/zoid/src/parent/index.js
    [5]  84│     initPromise : ZalgoPromise<void>
           :
        136│                 return this.renderContainer(proxyContainer, { context, uid });
        137│             });
        138│
        139│             tasks.open = this.driver.renderedIntoContainer
        140│                 ? tasks.renderContainer.then(proxyOutlet => this.open(proxyOutlet))
        141│                 : this.open();
        142│
        143│             tasks.saveProxyWin = tasks.open.then(({ proxyWin }) => {
        144│                 this.proxyWin = proxyWin;
           :
    [1] 206│     buildWindowName({ proxyWin, initialDomain, domain, target, uid, context } : { proxyWin : ProxyWindow, initialDomain : string, domain : string | RegExp, target : CrossDomainWindowType, context : $Values<typeof CONTEXT>, uid : string }) : string {
           :
 [3][4] 316│     open(proxyOutlet? : ProxyElement) : ZalgoPromise<{ proxyWin : ProxyWindow, proxyFrame? : ProxyElement }> {

        node_modules/zalgo-promise/src/promise.js
    [2]   7│ export class ZalgoPromise<R : mixed> {
           :
    [6] 226│     then<X : mixed, Y : mixed>(onSuccess : void | (result : R) => (ZalgoPromise<X> | Y), onError : void | (error : mixed) => (ZalgoPromise<X> | Y)) : ZalgoPromise<X | Y> {


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/zoid/src/parent/index.js:140:61

Cannot call tasks.renderContainer.then with function bound to onSuccess because object type [1] is incompatible with
string [2] in type argument R [3] of the return value.

     node_modules/zoid/src/parent/index.js
     137│             });
     138│
     139│             tasks.open = this.driver.renderedIntoContainer
     140│                 ? tasks.renderContainer.then(proxyOutlet => this.open(proxyOutlet))
     141│                 : this.open();
     142│
     143│             tasks.saveProxyWin = tasks.open.then(({ proxyWin }) => {
        :
 [2] 206│     buildWindowName({ proxyWin, initialDomain, domain, target, uid, context } : { proxyWin : ProxyWindow, initialDomain : string, domain : string | RegExp, target : CrossDomainWindowType, context : $Values<typeof CONTEXT>, uid : string }) : string {
        :
 [1] 316│     open(proxyOutlet? : ProxyElement) : ZalgoPromise<{ proxyWin : ProxyWindow, proxyFrame? : ProxyElement }> {

     node_modules/zalgo-promise/src/promise.js
 [3]   7│ export class ZalgoPromise<R : mixed> {


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/zoid/src/parent/index.js:140:71

Cannot call this.open with proxyOutlet bound to proxyOutlet because:
 • inexact ZalgoPromise [1] is incompatible with exact ProxyElement [2].
 • inexact string [3] is incompatible with exact ProxyElement [2].
 • inexact ZalgoPromise [4] is incompatible with exact ProxyElement [2].

     node_modules/zoid/src/parent/index.js
     137│             });
     138
     139│             tasks.open = this.driver.renderedIntoContainer
     140│                 ? tasks.renderContainer.then(proxyOutlet => this.open(proxyOutlet))
     141│                 : this.open();
     142│
     143│             tasks.saveProxyWin = tasks.open.then(({ proxyWin }) => {
        :
 [3] 206│     buildWindowName({ proxyWin, initialDomain, domain, target, uid, context } : { proxyWin : ProxyWindow, initialDomain : string, domain : string | RegExp, target : CrossDomainWindowType, context : $Values<typeof CONTEXT>, uid : string }) : string {
        :
 [4] 270│     buildUrl() : ZalgoPromise<string> {
        :
 [2] 316│     open(proxyOutlet? : ProxyElement) : ZalgoPromise<{ proxyWin : ProxyWindow, proxyFrame? : ProxyElement }> {

     node_modules/zalgo-promise/src/promise.js
 [1] 226│     then<X : mixed, Y : mixed>(onSuccess : void | (result : R) => (ZalgoPromise<X> | Y), onError : void | (error : mixed) => (ZalgoPromise<X> | Y)) : ZalgoPromise<X | Y> {


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/zoid/src/parent/index.js:157:24

Cannot call ZalgoPromise.all(...).then with function bound to onSuccess because object type [1] is incompatible with
string [2] in type argument R [3] of the return value.

     node_modules/zoid/src/parent/index.js
     153│                 return proxyWin.setName(windowName);
     154│             });
     155│
     156│             tasks.prerender = ZalgoPromise.all([ tasks.open, tasks.renderContainer ]).then(([ { proxyWin }, proxyOutlet ]) => {
     157│                 return this.prerender(proxyWin, proxyOutlet, { context, uid });
     158│             });
     159
     160│             tasks.loadUrl = ZalgoPromise.all([ tasks.open, tasks.buildUrl, tasks.setWindowName, tasks.prerender ]).then(([ { proxyWin }, url ]) => {
     161│                 return proxyWin.setLocation(url);
        :
 [2] 206│     buildWindowName({ proxyWin, initialDomain, domain, target, uid, context } : { proxyWin : ProxyWindow, initialDomain : string, domain : string | RegExp, target : CrossDomainWindowType, context : $Values<typeof CONTEXT>, uid : string }) : string {
        :
 [1] 511│     prerender(proxyWin : ProxyWindow, proxyElement : ProxyElement, { context, uid } : { context : $Values<typeof CONTEXT>, uid : string }) : ZalgoPromise<{ proxyPrerenderWin : ProxyWindow, proxyPrerenderFrame : ?ProxyElement }> {

     node_modules/zalgo-promise/src/promise.js
 [3]   7│ export class ZalgoPromise<R : mixed> {


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/zoid/src/parent/index.js:157:49

Cannot call this.prerender with proxyOutlet bound to proxyElement because:
 • inexact ZalgoPromise [1] is incompatible with exact ProxyElement [2].
 • inexact undefined [3] is incompatible with exact ProxyElement [2].
 • inexact string [4] is incompatible with exact ProxyElement [2].
 • inexact ZalgoPromise [5] is incompatible with exact ProxyElement [2].
 • inexact ZalgoPromise [6] is incompatible with exact ProxyElement [2].

     node_modules/zoid/src/parent/index.js
 [3]  84│     initPromise : ZalgoPromise<void>
        :
     154│             });
     155
     156│             tasks.prerender = ZalgoPromise.all([ tasks.open, tasks.renderContainer ]).then(([ { proxyWin }, proxyOutlet ]) => {
     157│                 return this.prerender(proxyWin, proxyOutlet, { context, uid });
     158│             });
     159
     160│             tasks.loadUrl = ZalgoPromise.all([ tasks.open, tasks.buildUrl, tasks.setWindowName, tasks.prerender ]).then(([ { proxyWin }, url ]) => {
        :
 [4] 206│     buildWindowName({ proxyWin, initialDomain, domain, target, uid, context } : { proxyWin : ProxyWindow, initialDomain : string, domain : string | RegExp, target : CrossDomainWindowType, context : $Values<typeof CONTEXT>, uid : string }) : string {
        :
 [5] 270│     buildUrl() : ZalgoPromise<string> {
        :
 [6] 316│     open(proxyOutlet? : ProxyElement) : ZalgoPromise<{ proxyWin : ProxyWindow, proxyFrame? : ProxyElement }> {
        :
 [2] 511│     prerender(proxyWin : ProxyWindow, proxyElement : ProxyElement, { context, uid } : { context : $Values<typeof CONTEXT>, uid : string }) : ZalgoPromise<{ proxyPrerenderWin : ProxyWindow, proxyPrerenderFrame : ?ProxyElement }> {

     node_modules/zalgo-promise/src/promise.js
 [1] 226│     then<X : mixed, Y : mixed>(onSuccess : void | (result : R) => (ZalgoPromise<X> | Y), onError : void | (error : mixed) => (ZalgoPromise<X> | Y)) : ZalgoPromise<X | Y> {


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/zoid/src/parent/index.js:164:54

Cannot call tasks.open.then with function bound to onSuccess because:
 • property proxyWin is missing in ZalgoPromise [1] in the first argument.
 • property proxyWin is missing in undefined [2] in the first argument.
 • property proxyWin is missing in String [3] in the first argument.

     node_modules/zoid/src/parent/index.js
 [2]  84│     initPromise : ZalgoPromise<void>
        :
     161│                 return proxyWin.setLocation(url);
     162│             });
     163│
     164│             tasks.watchForClose = tasks.open.then(({ proxyWin }) => {
     165│                 return this.watchForClose(proxyWin);
     166│             });
     167
     168│             tasks.onDisplay = tasks.prerender.then(() => {
     169│                 return this.props.onDisplay();
        :
 [3] 206│     buildWindowName({ proxyWin, initialDomain, domain, target, uid, context } : { proxyWin : ProxyWindow, initialDomain : string, domain : string | RegExp, target : CrossDomainWindowType, context : $Values<typeof CONTEXT>, uid : string }) : string {

     node_modules/zalgo-promise/src/promise.js
 [1] 226│     then<X : mixed, Y : mixed>(onSuccess : void | (result : R) => (ZalgoPromise<X> | Y), onError : void | (error : mixed) => (ZalgoPromise<X> | Y)) : ZalgoPromise<X | Y> {


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/zoid/src/parent/index.js:172:51

Cannot call tasks.open.then with function bound to onSuccess because:
 • property proxyWin is missing in ZalgoPromise [1] in the first argument.
 • property proxyWin is missing in undefined [2] in the first argument.
 • property proxyWin is missing in String [3] in the first argument.

     node_modules/zoid/src/parent/index.js
 [2]  84│     initPromise : ZalgoPromise<void>
        :
     169│                 return this.props.onDisplay();
     170│             });
     171│
     172│             tasks.openBridge = tasks.open.then(({ proxyWin }) => {
     173│                 return this.openBridge(proxyWin, initialDomain, context);
     174│             });
     175
     176│             tasks.switchPrerender = ZalgoPromise.all([ tasks.open, tasks.prerender, tasks.init ]).then(([ { proxyFrame }, { proxyPrerenderFrame } ]) => {
     177│                 return this.switchPrerender({ proxyFrame, proxyPrerenderFrame });
        :
 [3] 206│     buildWindowName({ proxyWin, initialDomain, domain, target, uid, context } : { proxyWin : ProxyWindow, initialDomain : string, domain : string | RegExp, target : CrossDomainWindowType, context : $Values<typeof CONTEXT>, uid : string }) : string {

     node_modules/zalgo-promise/src/promise.js
 [1] 226│     then<X : mixed, Y : mixed>(onSuccess : void | (result : R) => (ZalgoPromise<X> | Y), onError : void | (error : mixed) => (ZalgoPromise<X> | Y)) : ZalgoPromise<X | Y> {


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/zoid/src/parent/index.js:176:125

Property proxyPrerenderFrame is missing in undefined [1].

 [1]  84│     initPromise : ZalgoPromise<void>
        :
     173│                 return this.openBridge(proxyWin, initialDomain, context);
     174│             });
     175│
     176│             tasks.switchPrerender = ZalgoPromise.all([ tasks.open, tasks.prerender, tasks.init ]).then(([ { proxyFrame }, { proxyPrerenderFrame } ]) => {
     177│                 return this.switchPrerender({ proxyFrame, proxyPrerenderFrame });
     178│             });
     179



Found 31 errors

Only showing the most relevant union/intersection branches.
To see all branches, re-run Flow with --show-all-branches
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! zoid-demo@1.0.4 flow: `flow`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the zoid-demo@1.0.4 flow script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/mcs/.npm/_logs/2020-02-03T08_13_27_068Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! zoid-demo@1.0.4 test: `npm run lint && npm run flow-typed && npm run flow && npm run karma`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the zoid-demo@1.0.4 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/mcs/.npm/_logs/2020-02-03T08_13_27_104Z-debug.log
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Can't run build

Hi, I've just forked this repo (great work btw) and I'm running npm run build after installing everything and im getting the following error:

28 11 2017 17:42:11.819:WARN [reporter]: SourceMap position not found for trace: undefined
HeadlessChrome 0.0.0 (Mac OS X 10.12.6) ERROR
  Uncaught ReferenceError: __ALLOW_POSTMESSAGE_POPUP__ is not defined
  at test/test.js:1665

Please help :)

Full output:

> [email protected] build /Users/matimenich/playground/xcomponent-demo
> npm run test && npm run babel && npm run webpack


> [email protected] test /Users/matimenich/playground/xcomponent-demo
> npm run lint && npm run flow && npm run karma


> [email protected] lint /Users/matimenich/playground/xcomponent-demo
> eslint src/ test/ *.js


> [email protected] flow /Users/matimenich/playground/xcomponent-demo
> flow

No errors!

> [email protected] karma /Users/matimenich/playground/xcomponent-demo
> cross-env NODE_ENV=test babel-node --plugins=transform-es2015-modules-commonjs ./node_modules/.bin/karma start

28 11 2017 17:42:11.819:WARN [reporter]: SourceMap position not found for trace: undefined
HeadlessChrome 0.0.0 (Mac OS X 10.12.6) ERROR
  Uncaught ReferenceError: __ALLOW_POSTMESSAGE_POPUP__ is not defined
  at test/test.js:1665

HeadlessChrome 0.0.0 (Mac OS X 10.12.6): Executed 0 of 0 ERROR (0.337 secs / 0 secs)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] karma: `cross-env NODE_ENV=test babel-node --plugins=transform-es2015-modules-commonjs ./node_modules/.bin/karma start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] karma script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/matimenich/.npm/_logs/2017-11-28T20_42_12_045Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test: `npm run lint && npm run flow && npm run karma`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/matimenich/.npm/_logs/2017-11-28T20_42_12_087Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `npm run test && npm run babel && npm run webpack`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/matimenich/.npm/_logs/2017-11-28T20_42_12_123Z-debug.log

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.