Err in node_module

So I’m new using glitch.com and I keep receiving this:

const utf8Encoder = new TextEncoder();
ReferenceError: TextEncoder is not defined

IDK how I deal with that on glitch plataform, if someone knows a way to solve this or to work around it, I apreciate it.

The project name is “clean-dolomite-fly”.

Hi and welcome, @NarsheS! Can you please give us your project name?

Of course! The project name is “clean-dolomite-fly”, sorry for the late answer.

I will edit the post and put the name on it too, ty.

1 Like

Hi again, you don’t seem to have that piece of code in your project!

I’ve been searching online and it says that it missing a part of a code in node_modules but I can’t acess it and edit that piece cuz we can’t import our node_modules folder.

Well, you can go ls node_modules/ and inside every directory in the terminal and then edit the file with nano (see Can you access node_modules?)


Bem, pode fazer ls [folder_path] com cada pasta dentro de node_modules e depois usar o nano para editar o respectivo ficheiro. (ver Can you access node_modules?)

Ok but how i open on the screen and see the code with the terminal? How that nano works? Just type nano . on the folder?

Nano:
nano [file_path]
LS:
ls [folder_path]

is this from within nodejs? I’m seeing that TextEncoder is available natively since nodejs 11+ TextEncoder - Web APIs | MDN. check in the glitch help center on how to change what node version you’re using

1 Like