Installing node packages / dependencies using npm on Windows Server 2008

心已入冬 提交于 2019-12-24 08:05:04

问题


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

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

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

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

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

Thanks.


回答1:


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

From NPM:

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.



来源:https://stackoverflow.com/questions/7678915/installing-node-packages-dependencies-using-npm-on-windows-server-2008

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!