pop-os / shell

Pop!_OS Shell
GNU General Public License v3.0
4.77k stars 262 forks source link

Missing module `undici-types` #1664

Closed tarsobcaldas closed 6 months ago

tarsobcaldas commented 8 months ago

Hello, I'm using ArchLinux and I've been trying to install via both AUR and by trying to compile from the git repository. In both cases, when trying to compile, I get an error calling for a missing module undici-types, which I've tried installing, both locally and globally, resintalling typescript and other things, but haven't had any success.

(1) Issue/Bug Description: When I try to compile I multiple errors like

../../../../../node_modules/@types/node/globals.d.ts:344:37 - error TS2792: Cannot find module 'undici-types'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?

344         type RequestDuplex = import("undici-types").RequestDuplex;

All of them are in the same file, globals.d.ts.

(2) Steps to reproduce (if you know):

Trying to complie via any source

(3) Expected behavior: Successful compilation

(4) Distribution (run cat /etc/os-release): Arch Linux

(5) Gnome Shell version: Gnome Shell 45

venkatmuthyala commented 8 months ago

Recently got same error while building angular js application, Waiting for Solution :)

vhespanha commented 8 months ago

Waiting for solution too...

clebsonsantos commented 6 months ago

same error while building node application for rc-apps-engine. waiting for solution...

vhespanha commented 6 months ago

still get the same error

Venryx commented 6 months ago

I've encountered the same error; not with this "shell" repo, but in another context. But since this is the top google result for the error (and there is virtually no info on it), I figured I'd still post my solution here...

The only solution I've found so far is to downgrade @types/node from 20.10.6 to 20.0.0. (forced the downgrade using yarn's "resolutions" feature: https://classic.yarnpkg.com/lang/en/docs/selective-version-resolutions)

ldm0 commented 6 months ago

Kind of weird, I fixed this error by deleting node_modules directory.

tarsobcaldas commented 6 months ago

Kind of weird, I fixed this error by deleting node_modules directory.

Yup, that worked.

akylbek04 commented 5 months ago

Thanks, it works

lukepuplett commented 1 month ago

I've encountered the same error; not with this "shell" repo, but in another context. But since this is the top google result for the error (and there is virtually no info on it), I figured I'd still post my solution here...

The only solution I've found so far is to downgrade @types/node from 20.10.6 to 20.0.0. (forced the downgrade using yarn's "resolutions" feature: https://classic.yarnpkg.com/lang/en/docs/selective-version-resolutions)

For NPM users, add "@types/node": "20.0.0" to devDependencies and run npm install. Had this issue compiling my TS after updating some stuff to troubleshoot a different issue which was actually iCloud processes going nuts.