问题
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