Reputation: 101
i have looked online for ways of using node dependencies without npm, but have not found any resources. can anybody point me in a direction of how i can do this?
for example, suppose I have sqlite3 compiled on my linux machine, how could i utilize it with node in this form (without using npm to redownload it)? is this even possible?
for context, I do not have internet on this machine (not possible to get internet either without IT, I can only transfer files via an FTP). any suggestions would help
Upvotes: 0
Views: 129
Reputation: 70075
When dealing with a system that does not have an internet connection, a lot of people put the node_modules
directory into their code repository so that whatever you use to get your code onto the machine also installs all the dependencies.
Upvotes: 0
Reputation: 342
Not sure if npm is directly supporting ftp transfer but using a "tarball" should work.
npm install <tarball>
see: https://docs.npmjs.com/cli/v7/commands/npm-install
Upvotes: 1