如何手动安装node.js模块? [英] How to manually install a node.js module?

查看:121
本文介绍了如何手动安装node.js模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想上传一个文件到S3,所以我想从这篇文章运行上传程序:
http://www.componentix.com/blog/9

为此我需要安装multipart模块。
https://github.com/isaacs/multipart-js



但是通过执行npm install multipart它给出了错误

我应该如何安装这个多部分模块,以便我可以得到这个程序运行?

解决方案

https://github.com/isaacs/multipart-js (包括里面的所有文件)。



把所有这些文件放在你的旁边节点应用程序在同一个文件夹中。



在应用程序文件的顶部,您已经包含了其他模块,如http等。
$ b

var multipart = require(./ multipart)


I want to upload a file to s3 so I want to run the upload program from this article: http://www.componentix.com/blog/9

For this I need to install the multipart module. https://github.com/isaacs/multipart-js

But by doing npm install multipart it is giving error

How should I install this multipart module so that I can get this program running?

解决方案

Download lib folder from the https://github.com/isaacs/multipart-js (including all the files inside it).

Put all those files next to your node application int the same folder.

On the top of your application file where you have included other modules like http etc. ..append this >

var multipart = require("./multipart")

这篇关于如何手动安装node.js模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆