Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReferenceError: global is not defined #10

Open
tenthyoung opened this issue Jun 2, 2021 · 0 comments
Open

ReferenceError: global is not defined #10

tenthyoung opened this issue Jun 2, 2021 · 0 comments

Comments

@tenthyoung
Copy link

tenthyoung commented Jun 2, 2021

Hi! I'm using Vite and React, and I installed run-sdk, and I'm getting the error, "global is not defined" when I try to import Run.

import React, { useState } from "react";
import logo from "./logo.svg";
import Run from "run-sdk";
import "./App.css";

function App() {
  const [count, setCount] = useState(0);

  console.log(Run);

  return (
    <div className="App">
      <header className="App-header">
        <img src={logo} className="App-logo" alt="logo" />
        <p>Hello Vite + React!</p>
        <p>
          <button onClick={() => setCount((count) => count + 1)}>
            count is: {count}
          </button>
        </p>
        <p>
          Edit <code>App.jsx</code> and save to test HMR updates.
        </p>
        <p>
          <a
            className="App-link"
            href="https://reactjs.org"
            target="_blank"
            rel="noopener noreferrer"
          >
            Learn React
          </a>
          {" | "}
          <a
            className="App-link"
            href="https://vitejs.dev/guide/features.html"
            target="_blank"
            rel="noopener noreferrer"
          >
            Vite Docs
          </a>
        </p>
      </header>
    </div>
  );
}

export default App;

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant