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

classes.ts:22 Uncaught ReferenceError: process is not defined #4829

Closed
JenuelDev opened this issue Jul 31, 2021 · 2 comments
Closed

classes.ts:22 Uncaught ReferenceError: process is not defined #4829

JenuelDev opened this issue Jul 31, 2021 · 2 comments

Comments

@JenuelDev
Copy link

Environment

  • Package version(s): "^3.47.0"
  • Operating System: windows 10
  • Browser name and version: Chrome 92.+

Code Sandbox

link to sandbox

Steps to reproduce

  1. git clone https://github.com/BroJenuel-Youtube/testing-vite-react
  2. yarn dev
  3. Button not working!

Actual behavior

I tried using VITE for my react project, used a button but not working. and this error shows up in my console.
image

here is the code

import React, { useState } from 'react'
import logo from './logo.svg'
import './App.css'
import { Button } from "@blueprintjs/core";

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

  return (
    <div className="App">
      <Button intent="success" text="button content" onClick={() => setCount((count) => count +1)} />
      Hello World! {count}
      <button onClick={() => setCount((count) => count +1)} >
        Button
      </button>
    </div>
  )
}

export default App

Expected behavior

The button component should run.

@adidahiya
Copy link
Contributor

I'm not familiar with Vite. This looks like a duplicate of #3739. Until that issue is fixed, maybe you can define process.env through Vite config?

@adidahiya
Copy link
Contributor

fixed by #4934

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

No branches or pull requests

2 participants