在Windows Server 2008上使用npm安装节点程序包/依赖项 [英] Installing node packages / dependencies using npm on Windows Server 2008

查看:267
本文介绍了在Windows Server 2008上使用npm安装节点程序包/依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载了Windows的节点js二进制文件,其中包含所有cygwin依赖项,等等.

I downloaded the node js binaries for windows, it contains all the cygwin dependencies, etc.

因此,我可以CD到C:\ Program Files(x86)\ node \ bin文件夹并运行"shell",然后运行"node npm install",然后该命令起作用.

So I can cd to the C:\Program Files (x86)\node\bin folder and run 'shell' then 'node npm install' and the command works.

我到底要指出什么?我尝试根据文档将其指向软件包.tar.gz/.zip或解压缩的文件夹,但收到一些错误,

What exactly do I point it to? I tried pointing it to the packages .tar.gz / .zip or the extracted folder as per the documentation but I receive several errors,

C:\Program Files (x86)\node\bin>node npm install andris9-Nodemailer-10eb182
npm ERR! tar -cvf - <file list elided> execvp(): No such file or directory
npm ERR! tar -cvf - <file list elided>
npm ERR! Failed creating the tarball.

npm not ok

如何在Windows中最简单地完成此操作?阅读了很多教程,但是它们的解释各不相同,而且似乎都不起作用.

How is this most simply done in Windows? Read many tutorials but they all vary in explanation and none seem to work.

如果有一种更简单的方法可以仅从我的主.js文件中引用依赖项,这也会有所帮助.

If there is a simpler way to just reference dependencies from my main .js file that would help too.

谢谢.

推荐答案

我想您应该可以下载源代码并将其手动放入库中.

I would imagine that you should be able to just download the source and put the libraries in manually.

来自NPM:

local —在本地将软件包安装在当前工作目录中.节点模块位于./node_modules中,可执行文件位于./node_modules/.bin/中,并且根本没有安装手册页.

locally —- This installs your package in the current working directory. Node modules go in ./node_modules, executables go in ./node_modules/.bin/, and man pages aren’t installed at all.

我很确定那是可行的..我想.

I'm pretty sure that would work.. i think.

这篇关于在Windows Server 2008上使用npm安装节点程序包/依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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