appkit icon indicating copy to clipboard operation
appkit copied to clipboard

[bug] Uncaught ReferenceError: process is not defined

Open isLiuyinghao opened this issue 1 year ago • 4 comments

Link to minimal reproducible example

chunk-Z5VIPYNZ.js?v=a68062de:11621 Uncaught ReferenceError: process is not defined at chunk-Z5VIPYNZ.js?v=a68062de:11621:19

Summary

Image

List of related npm package versions

chunk-Z5VIPYNZ.js?v=a68062de:11621 Uncaught ReferenceError: process is not defined at chunk-Z5VIPYNZ.js?v=a68062de:11621:19

Node.js Version

20.16.0

Package Manager

9.15.4

isLiuyinghao avatar Feb 26 '25 19:02 isLiuyinghao

+1

PanoSui avatar Feb 26 '25 20:02 PanoSui

also hitting this

nurdism avatar Feb 26 '25 22:02 nurdism

For our vite users you can immediately solve it by adding this to your vite.config.ts

import {defineConfig} from 'vite'
import react from '@vitejs/plugin-react'

// https://vitejs.dev/config/
export default defineConfig({
  define: {
    "process.env": {}, // Prevents errors related to `process.env`
  }
})

PanoSui avatar Feb 26 '25 22:02 PanoSui