How to install and use custom node packages

I’m trying to use a ftp client package from the repository but depending on the package I get different errors. I think I’m missing a structural point with vite and typescript here. What I do is npm install basic-ftp in my needle project and the setting the script up like so:

import { Behaviour, serializable } from "@needle-tools/engine";
import { Client } from "basic-ftp";

Do I have to add this to something else?

Original Post on Discord

by user 334342083445784576

What errors do you get? That works if the package can be imported like that (depends on the package). Nothing Needle specific here