Reputation: 121
I want to use node.js on windows but I don't want to install it (I have no admin rights). I just want to put all the necessary files in a folder. Then create an cmd script to execute some script. Actually I want to use node.js as a build system. I just need gulp.
So I tried something but it didn't work.
I downloaded node.exe from http://nodejs.org/download/ (just exe file). Then I downloaded npm-1.4.9.zip from http://nodejs.org/dist/npm/ and extracted the files and put them in a folder with the node.exe file. So far so good.
Then I updated the npm with "npm update" command and it worked. After that I tried to install gulp. "npm install gulp" didn't work.
npm ERR! Windows_NT 6.2.9200 npm ERR! argv "C:\\dev\\node\\\\node.exe" "C:\\dev\\node\\node_modules\\npm\\bin \\npm-cli.js" "install" "gulp" npm ERR! node v0.10.34 npm ERR! npm v2.1.17 npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node fetch.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script 'node fetch.js'. npm ERR! This is most likely a problem with the v8flags package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node fetch.js npm ERR! You can get their info via: npm ERR! npm owner ls v8flags npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! C:\dev\node\npm-debug.log
Is there a better way to use node.js in windows as a local user. I don't want to use as globally in my system or as a web server. I just want to execute node scripts sometimes.
Upvotes: 2
Views: 4576
Reputation: 121
I have found the problem. When npm is working, some script tries to execute "node fetch.js". But it can't find the node.exe because the working directory has changed.
So we have to add the folder that contains node.exe, to the PATH environment variable, at least temporarily. I used this command for my case.
set PATH=%PATH%;C:\\dev\\node
After this I issued "npm install gulp". And it worked.
So It seems that we can use node.js without installing.
Upvotes: 3