question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Zoid Usage in React: Error: Driver support not enabled

See original GitHub issue

Issue

Hi, been trying to learn how Zoid work with a React app. However, I am struggling to get the React web app to work with Zoid because it throws Driver support not enabled error at runtime.

debugging

The debugging attempt shows that the _proto is undefined on line 3316 in zoid.js, I am really not sure what’s missing in the current setup in React App and couldn’t find any relevant documentation or issue about it.

Any guidance for how to get around this issue would be very much appreciated.

Code

Here are the code that reproduce the issue:

In React app

import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import zoid from 'zoid';

export let ZoidComponent = zoid.create({
  tag: 'zoid-component',
  url: 'http://localhost:8080/Index.html'
});

let ReactComponent = ZoidComponent.driver('react', {
  React: React,
  ReactDOM: ReactDOM
});

class App extends Component {
  constructor(props) {
    super(props);
    this.state = {
      hasError: false
    };
  }

  componentDidCatch(error, info) {
    this.setState({ hasError: true, error });
  }

  render() {
    return this.state.hasError ? (
      <div>Error occurred when rendering React App</div>
    ) : (
      <ReactComponent loadComponent={'load Component'}/>
    );
  }
}

export default App;

Dependencies

Here are the references of the dependencies:

"dependencies": {
    "react": "16.8.6",
    "react-dom": "16.8.6",
    "redux": "4.0.1",
    "zoid": "9.0.24"
  },
  "devDependencies": {
    "@babel/core": "7.4.4",
    "@babel/preset-env": "7.4.4",
    "@babel/preset-react": "7.0.0",
    "babel-loader": "8.0.5",
    "webpack": "4.30.0",
    "webpack-cli": "3.3.2",
  }

Tried older version of React and React-dom as follow and doesn’t work either and throws the same error

    "react": "16.2.0",
    "react-dom": "16.2.1",

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
sainiankitcommented, Jun 12, 2019

import * as zoid from 'zoid/dist/zoid.frameworks.js'; solves that problem.

2reactions
bluepnumecommented, Jun 12, 2019

Did you start using dist/zoid.frameworks.js?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introducing zoid — cross-domain, React-like components ...
Here I'm rendering a cross-domain, iframe based component with zoid. ... major frameworks, then everyone can use them no matter what stack they're...
Read more >
krakenjs
At our startup, we are trying to use ZOID for reliably embedding applications on the websites of clients. So far everything seems fine,...
Read more >
Cross-Domain React Apps with Zoid and Create ... - YouTube
Sorry the volume is loud and the camera is obscuring the code ^_^ I'm learning how to create better videos.Full Tutorial available at...
Read more >
zoid
Cross domain components.. Latest version: 9.0.86, last published: a year ago. Start using zoid in your project by running `npm i zoid`.
Read more >
zoid.min.js.map
The CDN for zoid. ... zoid/dist/zoid.min.js.map ... Error(`Popups not supported in this build -- please use the full zoid.js build`);\n }\n\n let anyEnabled ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found