Error: process is not define
Problem
- while using vue-shepherd, it gives console error of
process is not defined
Screen Shot
I just had the same issue here and I was able to solve this by defining the ES_BUILD environment variable in my quasar.conf.js file.
From my understanding this error is more an issue of your dev setup than of the library here. But it took me quite a while to find out.
I've just set the ES_BUILD variable to null. I fount a hint to this solution here: https://github.com/quasarframework/quasar/discussions/9967
I assume there will be something similar in the Vite.js configuration.
I don't use quasar but I encountered the same issue.
I managed to fix it by updating my vite.config.mjs as such
export default defineConfig(({ mode }) => ({
define: {
// compatibility with some dependencies
"process.env": {},
},
...
}
This seems a bit hacky but it does the job correctly.
Duplicate, see https://github.com/shipshapecode/vue-shepherd/issues/174#issuecomment-1400512294