N
Nuxt2y ago
u007

self is not defined

i just upgraded and im trying to use a browser side only package
import { readAndCompressImage } from 'browser-image-resizer'
import { readAndCompressImage } from 'browser-image-resizer'
and my file is called upload.client.ts and my vue component that uses this is named file-input.client.vue, why am i still getting self is not defined?
1 Reply
u007
u007OP2y ago
[nuxt] [request error] [unhandled] [500] self is not defined 12:44:47 AM
at Object.<anonymous> (./node_modules/.pnpm/[email protected]/node_modules/browser-image-resizer/dist/index.js:1:242)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:170:29) 12:43:32 AM
at ModuleJob.run (node:internal/modules/esm/module_job:198:25)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 0)
[nuxt] [request error] [unhandled] [500] self is not defined 12:44:47 AM
at Object.<anonymous> (./node_modules/.pnpm/[email protected]/node_modules/browser-image-resizer/dist/index.js:1:242)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:170:29) 12:43:32 AM
at ModuleJob.run (node:internal/modules/esm/module_job:198:25)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 0)
didnt realise ive another file importing upload client function that is not client side vue component
Want results from more Discord servers?
Add your server