3

This line of code

fs.unlinkSync("core.asar")

throws this error:

internal/fs/utils.js:269
    throw err;
    ^

Error: EPERM: operation not permitted, unlink 'core'
    at Object.unlinkSync (fs.js:1136:3)
    at Object.<anonymous> (D:\code\discord-tweaks\tools\inject.js:28:4)
    at Module._compile (internal/modules/cjs/loader.js:1015:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
    at Module.load (internal/modules/cjs/loader.js:879:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47 {
  errno: -4048,
  syscall: 'unlink',
  code: 'EPERM',
  path: 'core'
}

but here's the fun bit, the file actually does get deleted. What on earth is going on here?

Gradyn Wursten
  • 118
  • 2
  • 18
  • Have you checked this? https://stackoverflow.com/questions/46020018/error-eperm-operation-not-permitted-unlink-d-sources-node-modules-fseven – Dipendra Pant Feb 19 '21 at 03:06

0 Answers0