0

I was editing this program yesterday and it worked fine the whole time. The program is created using parcel, today when started up the script and the dev server was broken. This is the error i recived:

*Uncaught TypeError: Cannot read properties of undefined (reading 'isAbsolute')
    at parcelRequire.../node_modules/tar/lib/strip-absolute-path.js.path (strip-absolute-path.js:2:9)
    at newRequire (main.fb6bbcaf.js:47:24)
    at localRequire (main.fb6bbcaf.js:53:14)
    at parcelRequire.../node_modules/tar/lib/write-entry.js.minipass (write-entry.js:39:27)
    at newRequire (main.fb6bbcaf.js:47:24)
    at localRequire (main.fb6bbcaf.js:53:14)
    at parcelRequire.../node_modules/tar/lib/pack.js.minipass (pack.js:28:20)
    at newRequire (main.fb6bbcaf.js:47:24)
    at localRequire (main.fb6bbcaf.js:53:14)
    at parcelRequire.../node_modules/tar/lib/create.js../high-level-opt.js (create.js:6:14)*

I cant seem to find anyone else with the same error. This is strip-aboslute-path.js 2:9 where the error happens:

//unix absolute paths are also absolute on win32, so we use this for both
const { isAbsolute, parse } = require('path').win32

I’ve tried: npm install, npm install tar, npm i -g npm and changing the names of folders in the Path to the src file that included "å, ä, ö",

Would love get this running again, any suggestions on what to try next?

albjoh22
  • 1
  • 3
  • Judging from your recent edit, it seems that you have solved your issue. Instead of editing your question, I would encourage you to write an answer for your own question instead and mark it as accepted. – David Scholz Jun 05 '22 at 15:22

1 Answers1

0

Solved: This probably happened due to me trying to access a variable named x and vscode auto adding "import {x} from tar" at the top of the js file. When removing the import the program was working again.

albjoh22
  • 1
  • 3