nodists / nodist Goto Github PK
View Code? Open in Web Editor NEWNatural node.js and npm version manager for windows.
License: MIT License
Natural node.js and npm version manager for windows.
License: MIT License
I am seeing some test failures, given I can change the result be installing node v0.8.0, I do not think I am running the tests correctly. Here is sample output. First 3 tests fail. Looking at the tests, I experiment and install v0.8.0. Then, only 2 tests fail.
My c:\tmp\v directory is empty, it looks like thats where test installs should go.
C:\src\nodist [master +1 ~0 -0 !]> .\node.exe .\test\cli-test.js
· ? ? ?·
nodist list
? should list the installed version
» expected expression to evaluate to true, but was false // cli-test.js:35
nodist run
? should run the specified version
» expected expression to evaluate to true, but was null // cli-test.js:44
nodist rm
? should remove the specified version
» expected expression to evaluate to true, but was false // cli-test.js:53
? Broken » 2 honored · 3 broken (27.894s)
C:\src\nodist [master +1 ~0 -0 !]> .\bin\nodist.cmd
No builds installed, yet.
C:\src\nodist [master +1 ~0 -0 !]> .\bin\nodist.cmd + 0.8.0
0.8.0
C:\src\nodist [master +1 ~0 -0 !]> .\bin\nodist.cmd list
0.8.0
C:\src\nodist [master +1 ~0 -0 !]> .\node.exe .\test\cli-test.js
· ? ? ··
nodist list
? should list the installed version
» expected expression to evaluate to true, but was false // cli-test.js:35
nodist run
? should run the specified version
» expected expression to evaluate to true, but was null // cli-test.js:44
? Broken » 3 honored · 2 broken (7.059s)
C:\Utils\nodist>nodist update
1 file(s) copied.
npm http GET https://registry.npmjs.org/npm
npm http 304 https://registry.npmjs.org/npm
npm http GET https://registry.npmjs.org/npm/1.3.8
npm http 304 https://registry.npmjs.org/npm/1.3.8
npm WARN package.json github-url-from-git@1.1.1 No repository field.
C:\Utils\nodist\bin\npm -> C:\Utils\nodist\bin\node_modules\npm\bin\npm-cli.js
npm@1.3.8 C:\Utils\nodist\bin\node_modules\npm
'C:\Utils\nodist\bin\\node_modules\npm\bin\npm-cli.js" update npm -g' is not recognized as an internal or external command,
operable program or batch file.
1 file(s) moved.
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/semver
npm http 304 https://registry.npmjs.org/mkdirp
npm ERR! TypeError: Cannot read property 'from' of undefined
npm ERR! at C:\Utils\nodist\bin\node_modules\npm\lib\outdated.js:159:36
npm ERR! at C:\Utils\nodist\bin\node_modules\npm\lib\cache.js:591:30
npm ERR! at exports.unlock (C:\Utils\nodist\bin\node_modules\npm\node_modules\lockfile\lockfile.js:55:41)
npm ERR! at Object.oncomplete (fs.js:297:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Utils\\nodist\\bin\\\\node.exe" "C:\\Utils\\nodist\\bin\\node_modules\\npm\\cli.js" "update"
npm ERR! cwd C:\Utils\nodist
npm ERR! node -v v0.8.9
npm ERR! npm -v 1.3.8
npm ERR! type non_object_property_load
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/rimraf
npm ERR! TypeError: Cannot read property 'from' of undefined
npm ERR! at C:\Utils\nodist\bin\node_modules\npm\lib\outdated.js:159:36
npm ERR! at C:\Utils\nodist\bin\node_modules\npm\lib\cache.js:591:30
npm ERR! at exports.unlock (C:\Utils\nodist\bin\node_modules\npm\node_modules\lockfile\lockfile.js:55:41)
npm ERR! at Object.oncomplete (fs.js:297:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Utils\\nodist\\bin\\\\node.exe" "C:\\Utils\\nodist\\bin\\node_modules\\npm\\cli.js" "update"
npm ERR! cwd C:\Utils\nodist
npm ERR! node -v v0.8.9
npm ERR! npm -v 1.3.8
npm ERR! type non_object_property_load
npm ERR! TypeError: Cannot read property 'from' of undefined
npm ERR! at C:\Utils\nodist\bin\node_modules\npm\lib\outdated.js:159:36
npm ERR! at C:\Utils\nodist\bin\node_modules\npm\lib\cache.js:591:30
npm ERR! at exports.unlock (C:\Utils\nodist\bin\node_modules\npm\node_modules\lockfile\lockfile.js:55:41)
npm ERR! at Object.oncomplete (fs.js:297:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Utils\\nodist\\bin\\\\node.exe" "C:\\Utils\\nodist\\bin\\node_modules\\npm\\cli.js" "update"
npm ERR! cwd C:\Utils\nodist
npm ERR! node -v v0.8.9
npm ERR! npm -v 1.3.8
npm ERR! type non_object_property_load
npm ERR! TypeError: Cannot read property 'from' of undefined
npm ERR! at C:\Utils\nodist\bin\node_modules\npm\lib\outdated.js:159:36
npm ERR! at C:\Utils\nodist\bin\node_modules\npm\lib\cache.js:591:30
npm ERR! at exports.unlock (C:\Utils\nodist\bin\node_modules\npm\node_modules\lockfile\lockfile.js:55:41)
npm ERR! at Object.oncomplete (fs.js:297:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Utils\\nodist\\bin\\\\node.exe" "C:\\Utils\\nodist\\bin\\node_modules\\npm\\cli.js" "update"
npm ERR! cwd C:\Utils\nodist
npm ERR! node -v v0.8.9
npm ERR! npm -v 1.3.8
npm ERR! type non_object_property_load
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Utils\nodist\npm-debug.log
npm ERR! not ok code 0
C:\Utils\nodist>
PS C:\tmp> nodist ls
> 0.10.24
0.11.9
PS C:\tmp> nodist use latest
0.11.9
PS C:\projects\koa-test> npm install -save koa koa-common
[ - - - ]
npm WARN engine [email protected]: wanted: {"node":">= 0.11.9"} (current: {"node":"v0.10.24","npm":"1.3.21"})
[ - - - ]
Doing "nodist latest" instead of "nodist use latest" causes the warnings to disappear.
nodist bin stable
outputs path\to\nodist\v\stable\node.exe
I checked out the current build of nodist and added the path to the enviroment path. Nevertheless executing nodist in command line gets me the error:
'''module.js:340
throw err;
^
Error: Cannot find module 'semver'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object. (C:\Program Files (x86)\nodist\lib\versions.js:1:76)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
'''
I solved this by moving the node_modules directory of nodist/bin/node_modules/npm/node_modules/semver/ to nodist/node_modules/
Now since you have stuffed node.exe to the root, I had to add it to the path, see previous bugs.
Suppose I have installed nodist to the: C:\nodist\
I run npm install -g less jshint recess uglify-js
and all of the binaries gets installed to the root: C:\nodist\
and not to the C:\nodist\bin\
Also now I have two npm_modules:
C:\nodist\npm_modules
and C:\nodist\bin\npm_modules
Whats going on here? Did you accidentally put the node.exe in the root, when you were supposed to put it bin
?
OS: Windows 7 64Bit
Command prompt as admin
npm ERR! [email protected] install: `bin\install.cmd`
npm ERR! `cmd "/c" "bin\\install.cmd"` failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the nodist package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! bin\install.cmd
npm ERR! You can get their info via:
npm ERR! npm owner ls nodist
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "nodist"
npm ERR! cwd C:\Users\***
npm ERR! node -v v0.8.1
npm ERR! npm -v 1.1.33
npm ERR! code ELIFECYCLE
npm ERR! message [email protected] install: `bin\install.cmd`
npm ERR! message `cmd "/c" "bin\\install.cmd"` failed with 1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\***\npm-debug.log
npm ERR! not ok code 0
See npm/npm#6045. Here are the relevant parts:
I've just tried to update npm from version 1.4.23 (running npm update npm -g
), at some point in the process it executes the following CLI command:
"C:\nodist\bin\\node_modules\npm\bin\npm-cli.js" update npm -g
Thing is, Windows simply ignores the #!/usr/bin/env node
directive and opens the file with the given extension (.js
)'s associated default executable (in my case, Sublime Text 3), so the update just breaks there.
I believe it should be easy to fix, simply prefix the command with node
, so it would end up with:
node "path/to/npm-cli.js" update npm -g
This is definitely a nodist issue and not an npm one – npm rewrites the shebangs itself and also won't invoke itself without a node binary on the command line. Ideally this command would be invoked via node.cmd, so it's possible there's some kind of PATH hijinx going on. Either way, this isn't an npm problem.
No matter where I run nodist update
from, the modules don't seem to be installing to the right location. Tried it in good ol command prompt, as well as the git bash shell. I checked the nodist folder where I install it and there are no modules in the node_modules folder. I also tried NPM installing using the package.json in the nodist root, but all I get is Invalid password errors on random modules.
Here is an example of the error:
C:\Users\Neo\Projects>nodist update
1 file(s) copied.
npm WARN package.json [email protected] No README.md file found!
1 file(s) moved.
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/mkdirp
npm http 401 https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/mkdirp
npm http 401 https://registry.npmjs.org/rimraf
npm http 401 https://registry.npmjs.org/semver
npm http 401 https://registry.npmjs.org/request
npm http 401 https://registry.npmjs.org/mkdirp
C:\Users\Neo\Projects>nodist + v0.10.8
module.js:340
throw err;
^
Error: Cannot find module 'mkdirp'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (C:\Users\Neo\Projects\nodist\lib\nodist.js:27:18)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
I'm a little confused as to how NPM global packages are supposed to work. NPM packages installed with the global -g flag seem to get put in the node_modules folder in the active Node version folder.
.../nodist/v/0.10.31/bower.cmd
As these folders aren't added to the PATH variable there is no way to actually call any of your standard tools like bower or grunt without manually adding them to your PATH. Is this the expected behaviour when installing global packages? As far as I can tell, there is a global NPM version and I would have expected global dependencies to be installed in nodist/node_modules
or similar.
I tried to install and use nodist, but i had a previous installation of node.
It seems to work, but when i tried to install phonegap later, it failed because it found the worng node version (0.8.9), despite node -v answers 0.10.2
What can i do ?
Do i have to make a complete node uninstall ?
If yes, how ?
I get error:
C:\Users\...>nodist update
npm http GET https://registry.npmjs.org/npm
npm http 304 https://registry.npmjs.org/npm
npm http GET https://registry.npmjs.org/npm/1.1.68
npm http 304 https://registry.npmjs.org/npm/1.1.68
C:\...\node\bin\npm -> C:\...\node\bin\node_modules\npm\bin\npm-cli.js
[email protected] C:\...\node\bin\node_modules\npm
The system cannot find the path specified.
'node' is not recognized as an internal or external command,
operable program or batch file.
Your installation instructions are missing a one important ingredient: Add ...path...\nodist\ to your path also, the bin is not enough since node.exe is in the root directory.
Now I tried to install it also by adding only bin/
to path, then going to root directory and running. It works, but node.exe is not added to the path. And also I couldn't get the nodist stable
... commands to work.
I'm on windows 8.0. I removed node, used chocolately to install, and rebooted. I'm getting this error when trying to switch versions.
C:\apps\bath>nodist 0.11.13
Couldn't activate version 0.11.13 (EBUSY, open 'C:\Chocolatey\lib\nodist.0.4.6-beta\tools\nodist-master\bin\node.exe').
Sorry.
npm install now -g
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'now',
1 verbose cli '-g' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink C:\Program Files\nodejs\node.exe
5 verbose read json C:\Users\user\AppData\Roaming\npm\package.json
6 verbose read json C:\Users\user\AppData\Roaming\npm\package.json
7 verbose cache add [ 'now', null ]
8 silly cache add name=undefined spec="now" args=["now",null]
9 verbose parsed url { pathname: 'now', path: 'now', href: 'now' }
10 silly lockFile c9bc849a-now now
11 verbose lock now C:\Users\user\AppData\Roaming\npm-cache\c9bc849a-now.lock
12 silly lockFile c9bc849a-now now
13 verbose addNamed [ 'now', '' ]
14 verbose addNamed [ null, '' ]
15 silly lockFile 1193e862-now now@
16 verbose lock now@ C:\Users\user\AppData\Roaming\npm-cache\1193e862-now.lock
17 silly addNameRange { name: 'now', range: '', hasData: false }
18 verbose url raw now
19 verbose url resolving [ 'https://registry.npmjs.org/', './now' ]
20 verbose url resolved https://registry.npmjs.org/now
21 info trying registry request attempt 1 at 16:44:59
22 verbose etag "3Y8902A5BHD3AB8LKPLP99SC8"
23 http GET https://registry.npmjs.org/now
24 http 304 https://registry.npmjs.org/now
25 silly registry.get cb [ 304,
25 silly registry.get { server: 'CouchDB/1.2.0 (Erlang OTP/R15B)',
25 silly registry.get etag: '"3Y8902A5BHD3AB8LKPLP99SC8"',
25 silly registry.get date: 'Wed, 12 Sep 2012 11:15:03 GMT',
25 silly registry.get 'content-length': '0' } ]
26 verbose etag now from cache
27 silly addNameRange number 2 { name: 'now', range: '', hasData: true }
28 silly addNameRange versions [ 'now',
28 silly addNameRange [ '0.2.0',
28 silly addNameRange '0.2.1',
28 silly addNameRange '0.2.2',
28 silly addNameRange '0.2.3',
28 silly addNameRange '0.2.4',
28 silly addNameRange '0.3.0',
28 silly addNameRange '0.3.1',
28 silly addNameRange '0.3.2',
28 silly addNameRange '0.5.0',
28 silly addNameRange '0.5.1',
28 silly addNameRange '0.5.2',
28 silly addNameRange '0.5.3',
28 silly addNameRange '0.6.0',
28 silly addNameRange '0.6.1',
28 silly addNameRange '0.7.0',
28 silly addNameRange '0.7.1',
28 silly addNameRange '0.7.2',
28 silly addNameRange '0.7.3',
28 silly addNameRange '0.7.4',
28 silly addNameRange '0.7.5',
28 silly addNameRange '0.7.6',
28 silly addNameRange '0.8.0',
28 silly addNameRange '0.8.1' ] ]
29 verbose addNamed [ 'now', '0.8.1' ]
30 verbose addNamed [ '0.8.1', '0.8.1' ]
31 silly lockFile 00d2b6cb-now-0-8-1 [email protected]
32 verbose lock [email protected] C:\Users\user\AppData\Roaming\npm-cache\00d2b6cb-now-0-8-1.lock
33 verbose read json C:\Users\user\AppData\Roaming\npm-cache\now\0.8.1\package\package.json
34 silly lockFile 00d2b6cb-now-0-8-1 [email protected]
35 silly lockFile 1193e862-now now@
36 silly resolved [ { author: { name: 'Flotype' },
36 silly resolved name: 'now',
36 silly resolved description: 'NowJS: An easy to use real-time RPC library',
36 silly resolved version: '0.8.1',
36 silly resolved repository: { type: 'git', url: 'git://github.com/Flotype/now.git' },
36 silly resolved main: 'lib/server.js',
36 silly resolved engines: { node: '>= v0.4.0' },
36 silly resolved dependencies: { 'socket.io': '>= 0.8.7', 'node-proxy': '>= 0.4.0' },
36 silly resolved devDependencies: {},
36 silly resolved readme: 'Get NowJS http://www.nowjs.com/\n=========\n\n###NowJS makes realtime web apps really easy.\n\n\nGo to Github or \nDownload the master tgz\n\n\nInstall From npm\n----------------\n\nnpm install now
or npm install now -g
to install globally\n\n\n\nNowJS is a Node.js module. The client javascript (now.js) is served by the NowJS server.\n\n\nNowJS uses the excellent socket.io and node-proxy libraries.\n\n2 Step Setup\n==============\n\n1. On the server\n\n \n var httpServer = require('http').createServer(function(req, response){ /* Serve your static files / })\n httpServer.listen(8080);\n \n var nowjs = require("now");\n var everyone = nowjs.initialize(httpServer);\n \n everyone.now.logStuff = function(msg){\n console.log(msg);\n }\n \n__2. On the client_\n
\n<script type="text/javascript" src="http://localhost:8080/nowjs/now.js"></script>\n\n<script type="text/javascript">\n now.ready(function(){\n // "Hello World!" will print on server\n now.logStuff("Hello World!");\n });\n</script>\n
http://myserver:myport/nowjs/now.js
and host that, because it is automatically configured for your server.\n\nFurther Reading\n---------------\n\nNow that you have NowJS, try the NowJS User Manual and Quick Chat Example \n\nHave more questions? Please contact us:\nEmail: [email protected]\n\nIRC: #nowjs on freenode\n\nTwitter: @NowJSTeam',bash\nnpm install socket.io\n
\n\n## How to use\n\nFirst, require socket.io
:\n\njs\nvar io = require(\'socket.io\');\n
\n\nNext, attach it to a HTTP/HTTPS server. If you're using the fantastic express
\nweb framework:\n\n#### Express 3.x\n\njs\nvar app = express()\n , server = require(\'http\').createServer(app)\n , io = io.listen(server);\n\nserver.listen(80);\n\nio.sockets.on(\'connection\', function (socket) {\n socket.emit(\'news\', { hello: \'world\' });\n socket.on(\'my other event\', function (data) {\n console.log(data);\n });\n});\n
\n\n#### Express 2.x\n\njs\nvar app = express.createServer()\n , io = io.listen(app);\n\napp.listen(80);\n\nio.sockets.on(\'connection\', function (socket) {\n socket.emit(\'news\', { hello: \'world\' });\n socket.on(\'my other event\', function (data) {\n console.log(data);\n });\n});\n
\n\nFinally, load it from the client side code:\n\nhtml\n<script src="/socket.io/socket.io.js"></script>\n<script>\n var socket = io.connect(\'http://localhost\');\n socket.on(\'news\', function (data) {\n console.log(data);\n socket.emit(\'my other event\', { my: \'data\' });\n });\n</script>\n
\n\nFor more thorough examples, look at the examples/
directory.\n\n## Short recipes\n\n### Sending and receiving events.\n\nSocket.IO allows you to emit and receive custom events.\nBesides connect
, message
and disconnect
, you can emit custom events:\n\njs\n// note, io.listen(<port>) will create a http server for you\nvar io = require(\'socket.io\').listen(80);\n\nio.sockets.on(\'connection\', function (socket) {\n io.sockets.emit(\'this\', { will: \'be received by everyone\' });\n\n socket.on(\'private message\', function (from, msg) {\n console.log(\'I received a private message by \', from, \' saying \', msg);\n });\n\n socket.on(\'disconnect\', function () {\n io.sockets.emit(\'user disconnected\');\n });\n});\n
\n\n### Storing data associated to a client\n\nSometimes it's necessary to store data associated with a client that's\nnecessary for the duration of the session.\n\n#### Server side\n\njs\nvar io = require(\'socket.io\').listen(80);\n\nio.sockets.on(\'connection\', function (socket) {\n socket.on(\'set nickname\', function (name) {\n socket.set(\'nickname\', name, function () { socket.emit(\'ready\'); });\n });\n\n socket.on(\'msg\', function () {\n socket.get(\'nickname\', function (err, name) {\n console.log(\'Chat message by \', name);\n });\n });\n});\n
\n\n#### Client side\n\nhtml\n<script>\n var socket = io.connect(\'http://localhost\');\n\n socket.on(\'connect\', function () {\n socket.emit(\'set nickname\', prompt(\'What is your nickname?\'));\n socket.on(\'ready\', function () {\n console.log(\'Connected !\');\n socket.emit(\'msg\', prompt(\'What is your message?\'));\n });\n });\n</script>\n
\n\n### Restricting yourself to a namespace\n\nIf you have control over all the messages and events emitted for a particular\napplication, using the default /
namespace works.\n\nIf you want to leverage 3rd-party code, or produce code to share with others,\nsocket.io provides a way of namespacing a socket
.\n\nThis has the benefit of multiplexing
a single connection. Instead of\nsocket.io using two WebSocket
connections, it'll use one.\n\nThe following example defines a socket that listens on '/chat' and one for\n'/news':\n\n#### Server side\n\njs\nvar io = require(\'socket.io\').listen(80);\n\nvar chat = io\n .of(\'/chat\')\n .on(\'connection\', function (socket) {\n socket.emit(\'a message\', { that: \'only\', \'/chat\': \'will get\' });\n chat.emit(\'a message\', { everyone: \'in\', \'/chat\': \'will get\' });\n });\n\nvar news = io\n .of(\'/news\');\n .on(\'connection\', function (socket) {\n socket.emit(\'item\', { news: \'item\' });\n });\n
\n\n#### Client side:\n\nhtml\n<script>\n var chat = io.connect(\'http://localhost/chat\')\n , news = io.connect(\'http://localhost/news\');\n\n chat.on(\'connect\', function () {\n chat.emit(\'hi!\');\n });\n\n news.on(\'news\', function () {\n news.emit(\'woot\');\n });\n</script>\n
\n\n### Sending volatile messages.\n\nSometimes certain messages can be dropped. Let's say you have an app that\nshows realtime tweets for the keyword bieber
. \n\nIf a certain client is not ready to receive messages (because of network slowness\nor other issues, or because he's connected through long polling and is in the\nmiddle of a request-response cycle), if he doesn't receive ALL the tweets related\nto bieber your application won't suffer.\n\nIn that case, you might want to send those messages as volatile messages.\n\n#### Server side\n\njs\nvar io = require(\'socket.io\').listen(80);\n\nio.sockets.on(\'connection\', function (socket) {\n var tweets = setInterval(function () {\n getBieberTweet(function (tweet) {\n socket.volatile.emit(\'bieber tweet\', tweet);\n });\n }, 100);\n\n socket.on(\'disconnect\', function () {\n clearInterval(tweets);\n });\n});\n
\n\n#### Client side\n\nIn the client side, messages are received the same way whether they're volatile\nor not.\n\n### Getting acknowledgements\n\nSometimes, you might want to get a callback when the client confirmed the message\nreception.\n\nTo do this, simply pass a function as the last parameter of .send
or .emit
.\nWhat's more, when you use .emit
, the acknowledgement is done by you, which\nmeans you can also pass data along:\n\n#### Server side\n\njs\nvar io = require(\'socket.io\').listen(80);\n\nio.sockets.on(\'connection\', function (socket) {\n socket.on(\'ferret\', function (name, fn) {\n fn(\'woot\');\n });\n});\n
\n\n#### Client side\n\nhtml\n<script>\n var socket = io.connect(); // TIP: .connect with no args does auto-discovery\n socket.on(\'connect\', function () { // TIP: you can avoid listening on
connect and listen on events directly too!\n socket.emit(\'ferret\', \'tobi\', function (data) {\n console.log(data); // data will be \'woot\'\n });\n });\n</script>\n
\n\n### Broadcasting messages\n\nTo broadcast, simply add a broadcast
flag to emit
and send
method calls.\nBroadcasting means sending a message to everyone else except for the socket\nthat starts it.\n\n#### Server side\n\njs\nvar io = require(\'socket.io\').listen(80);\n\nio.sockets.on(\'connection\', function (socket) {\n socket.broadcast.emit(\'user connected\');\n socket.broadcast.json.send({ a: \'message\' });\n});\n
\n\n### Rooms\n\nSometimes you want to put certain sockets in the same room, so that it's easy\nto broadcast to all of them together.\n\nThink of this as built-in channels for sockets. Sockets join
and leave
\nrooms in each socket.\n\n#### Server side\n\njs\nvar io = require(\'socket.io\').listen(80);\n\nio.sockets.on(\'connection\', function (socket) {\n socket.join(\'justin bieber fans\');\n socket.broadcast.to(\'justin bieber fans\').emit(\'new fan\');\n io.sockets.in(\'rammstein fans\').emit(\'new non-fan\');\n});\n
\n\n### Using it just as a cross-browser WebSocket\n\nIf you just want the WebSocket semantics, you can do that too.\nSimply leverage send
and listen on the message
event:\n\n#### Server side\n\njs\nvar io = require(\'socket.io\').listen(80);\n\nio.sockets.on(\'connection\', function (socket) {\n socket.on(\'message\', function () { });\n socket.on(\'disconnect\', function () { });\n});\n
\n\n#### Client side\n\nhtml\n<script>\n var socket = io.connect(\'http://localhost/\');\n socket.on(\'connect\', function () {\n socket.send(\'hi\');\n\n socket.on(\'message\', function (msg) {\n // my msg\n });\n });\n</script>\n
\n\n### Changing configuration\n\nConfiguration in socket.io is TJ-style:\n\n#### Server side\n\njs\nvar io = require(\'socket.io\').listen(80);\n\nio.configure(function () {\n io.set(\'transports\', [\'websocket\', \'flashsocket\', \'xhr-polling\']);\n});\n\nio.configure(\'development\', function () {\n io.set(\'transports\', [\'websocket\', \'xhr-polling\']);\n io.enable(\'log\');\n});\n
\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2011 Guillermo Rauch <[email protected]>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n',node-gyp configure build
cmd "/c" "node-gyp configure build"
failed with 1In command prompt, showing not ok code 0.......
It means "now" module is not installed.
Therefore my server file is throwing error in line
var nowjs = require('now');
Could not found "now" module.
My module is installing in default set path as "C:\Users\user\AppData\Roaming\npm\node_modules"
and I am creating helloword_server.js file in "C:\projects\helloworld_example".
In above server file I am requiring "now" module. But not working.
Please help me its very urgent.
Fresh install on Windows 7 x64 box gets me this:
PS C:\Users\bradw> nodist update
1 file(s) copied.
npm http GET https://registry.npmjs.org/npm
npm http 200 https://registry.npmjs.org/npm
npm http GET https://registry.npmjs.org/npm/-/npm-1.3.8.tgz
npm http 200 https://registry.npmjs.org/npm/-/npm-1.3.8.tgz
npm http GET https://registry.npmjs.org/npm/1.3.8
npm http 200 https://registry.npmjs.org/npm/1.3.8
npm http GET https://registry.npmjs.org/npm/-/npm-1.3.8.tgz
npm http 200 https://registry.npmjs.org/npm/-/npm-1.3.8.tgz
C:\nodist\bin\npm -> C:\nodist\bin\node_modules\npm\bin\npm-cli.js
[email protected] C:\nodist\bin\node_modules\npm
The system cannot find the path specified.
npm http GET https://registry.npmjs.org/npm
npm http 304 https://registry.npmjs.org/npm
npm http GET https://registry.npmjs.org/npm/1.3.8
npm http 304 https://registry.npmjs.org/npm/1.3.8
npm WARN package.json [email protected] No repository field.
C:\nodist\bin\npm -> C:\nodist\bin\node_modules\npm\bin\npm-cli.js
[email protected] C:\nodist\bin\node_modules\npm
1 file(s) moved.
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/rimraf
npm http 200 https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz
npm http 200 https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/rimraf/-/rimraf-2.2.2.tgz
npm http 200 https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/semver/-/semver-2.1.0.tgz
npm http 200 https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz
npm http 200 https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/request/-/request-2.9.203.tgz
npm http 200 https://registry.npmjs.org/rimraf/-/rimraf-2.2.2.tgz
npm ERR! TypeError: Cannot read property 'from' of undefined
npm ERR! at C:\nodist\bin\node_modules\npm\lib\outdated.js:159:36
npm ERR! at C:\nodist\bin\node_modules\npm\lib\cache.js:591:30
npm ERR! at exports.unlock (C:\nodist\bin\node_modules\npm\node_modules\lockfile\lockfile.js:55:41)
npm ERR! at Object.oncomplete (fs.js:297:15)
npm ERR! If you need help, you may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! [email protected]
Write some tests, using vows!
Nodemon doesn't work with nodist. Neither if it's installed globally nor locally. Error output below:
D:\01_Development\sample>nodemon app.js
16 Aug 16:23:36 - [nodemon] v0.6.23
16 Aug 16:23:36 - [nodemon] watching: D:\01_Development\sample
16 Aug 16:23:36 - [nodemon] starting `node app.js`
CreateProcessW: The system cannot find the file specified.
16 Aug 16:23:36 - [nodemon] app crashed - waiting for file changes before starting...
When I run cup all, Chocolatey prints an error message about nodist : "Unable to find package 'nodist-beta'.", and the update fails because of that. Could you please fix it?
There is still a bit of work to be done on this...
THe run command, etc.
I'm running on Windows. Most nodist commands work fine, but when I try to use the 'use' command, here is the error I get:
PS c:\code> nodist use 0.8.19 0.8.19 C:\tools\nodist\cli.js:203 console.log(path.dirname(n.resolveToExe(v))); ^ TypeError: Object # has no method 'resolveToExe' at C:\tools\nodist\cli.js:203:34 at nodist.install (C:\tools\nodist\lib\nodist.js:176:16) at nodist.listAvailable (C:\tools\nodist\lib\nodist.js:99:31) at nodist.install (C:\tools\nodist\lib\nodist.js:174:7) at nodist.listInstalled (C:\tools\nodist\lib\nodist.js:140:12) at ReaddirReq.Req.done (C:\tools\nodist\node_modules\rimraf\node_modules\graceful-fs\graceful-fs.js:142:5) at ReaddirReq.done (C:\tools\nodist\node_modules\rimraf\node_modules\graceful-fs\graceful-fs.js:89:22) at Object.oncomplete (fs.js:297:15)
When trying to install the npm modules with nodist, its not getting installed properly..
is any specific command to run that
I have installed nodist since I noticed my node is out of date (0.6.2). So node was already installed. I followed the readme.
The update command ran without problem,
but running nodist stable
or nodist dist
throws an error in module.js
on line 340
where mkdirp
cannot be found.
mkdir on google shows some similar issues.
I couldn't run the nodist update with given instructions, but I managed to run it after I added nodist
to path also (see bug: 18).
But now if I run anything like: "nodist dist" (or nodist stable) ... it gives me error:
C:\...\node>nodist dist
module.js:340
throw err;
^
Error: Cannot find module 'mkdirp'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (C:\...\node\lib\nodist.js:27:18)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
How do I install this thing, so that it works?
Windows 7 / 64 bit
Since this is the first time I'm using nodist, I've probably misunderstood something about this usage description (https://github.com/marcelklehr/nodist/blob/master/usage.txt):
nodist add [x64] Download the specified node version.
PS C:\tmp> nodist ls
No builds installed, yet.
PS C:\tmp> nodist add 0.10.24 x64
0.10.24
PS C:\tmp> node.exe -p -e "process.arch"
ia32
That is, although I asked for the 64 bit version to be installed, what I got was the 32 bit version.
When you use Ctrl+C to kill a node app, you get prompted with "Terminate batch job (Y/N)?".
The MinGW shell can't run .cmd files.
Looking through history, I see you used to copy the .exe files around but changed to use .cmd files. I think going back to that would solve both of these issues. Or is there a way to use links/junctions?
The error occurs when calling nodist update
from within another batchfile (call nodist update
) which then results in terminatinating the calling batch file.
It happens because it is not allowed to use GOTO
to jump out of a block:
https://github.com/marcelklehr/nodist/blob/master/bin/nodist.cmd#L30
I get the following error when running the nodist -v
command from PowerShell. Issue appears to be in the bin/nodist.ps1 file added to fix the use
command in PowerShell.
C:\nodist\bin\nodist.ps1 : Missing an argument for parameter 'ver'. Specify a parameter of type 'Syste
m.Object' and try again.
At line:1 char:10
+ nodist -v <<<<
+ CategoryInfo : InvalidArgument: (:) [nodist.ps1], ParameterBindingException
+ FullyQualifiedErrorId : MissingArgument,nodist.ps1
otherwise, it'll try to install 'update'...
$ node --version
v0.10.29
$ nodist 0.8
Couldn't fetch 0.8.27: HTTP 404.
Sorry.
$ node --version
v0.10.29
404 error from the server shouldn't block me from switching the node version. It should fall back to the latest 0.8.x available.
I can work around this using nodist 0.8.26
(which I already have installed before) but nonetheless this, however rare it is, probably should be fixed.
>>nodist 0.11.13
0.11.13
>>nodist 0.10.30
0.10.30
>>nodist ls
> 0.10.30
0.11.13
>>nodist use v0.11.13
0.11.13
Version spec didn't match any available version.
Sorry.
I know the module not found is just from a botched NPM install but the log is confusing me.
Has anyone else ran into this? I have tried both the chocolately package and manual install on Windows 8 x64 and Windows 7 x64 with the same result on both.
C:\Users\JT4\nodist>nodist update
1 file(s) copied.
npm http GET https://registry.npmjs.org/npm
npm http 401 https://registry.npmjs.org/npm
npm http GET https://registry.npmjs.org/npm
npm http 401 https://registry.npmjs.org/npm
1 file(s) moved.
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/request
npm http 401 https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/mkdirp
npm http 401 https://registry.npmjs.org/request
npm http 401 https://registry.npmjs.org/rimraf
npm http 401 https://registry.npmjs.org/semver
npm http 401 https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/request/2.9.203
npm http GET https://registry.npmjs.org/semver/2.2.1
npm http GET https://registry.npmjs.org/rimraf/2.2.2
npm http GET https://registry.npmjs.org/mkdirp/0.3.5
npm http 401 https://registry.npmjs.org/mkdirp/0.3.5
npm http 401 https://registry.npmjs.org/request/2.9.203
npm ERR! Error: unauthorized User document conflicts must be resolved before the
document is used for authentication purposes.: request/2.9.203
npm ERR! at RegClient.<anonymous> (C:\Users\JT4\nodist\bin\node_modules\npm\
node_modules\npm-registry-client\lib\request.js:259:14)
npm ERR! at Request.init.self.callback (C:\Users\JT4\nodist\bin\node_modules
\npm\node_modules\request\main.js:120:22)
npm ERR! at Request.EventEmitter.emit (events.js:91:17)
npm ERR! at Request.<anonymous> (C:\Users\JT4\nodist\bin\node_modules\npm\no
de_modules\request\main.js:648:16)
npm ERR! at Request.EventEmitter.emit (events.js:115:20)
npm ERR! at IncomingMessage.Request.start.self.req.self.httpModule.request.b
uffer (C:\Users\JT4\nodist\bin\node_modules\npm\node_modules\request\main.js:610
:14)
npm ERR! at IncomingMessage.EventEmitter.emit (events.js:115:20)
npm ERR! at IncomingMessage._emitEnd (http.js:366:10)
npm ERR! at HTTPParser.parserOnMessageComplete [as onMessageComplete] (http.
js:149:23)
npm ERR! at CleartextStream.socketOnData (http.js:1366:20)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <[email protected]>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Users\\JT4\\nodist\\bin\\\\node.exe" "C:\\Users\\JT4\\nodi
st\\bin\\node_modules\\npm\\cli.js" "update"
npm ERR! cwd C:\Users\JT4\nodist
npm ERR! node -v v0.8.9
npm ERR! npm -v 1.1.68
npm http 401 https://registry.npmjs.org/rimraf/2.2.2
npm http 401 https://registry.npmjs.org/semver/2.2.1
[email protected] node_modules\mkdirp
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\JT4\nodist\npm-debug.log
npm ERR! not ok code 0
module.js:340
throw err;
^
Error: Cannot find module 'request'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (C:\Users\JT4\nodist\lib\nodist.js:28:18)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
Ok.. this sounds a bit weird...
When I install nodist with git clone and setting Path variable, things seems to work properly.
But when I install nodist with chocolatey, which installs nodist v0.4.6, things get out of hand.
I can see that nodist latest/stable does copy the correct versions into the lib. However, everytime I run node --version, I end up having v0.8.9 (or the version of node that nodist uses internally).
After some investigation, it seems that C:\ProgramData\chocolatey\bin\node.exe that is created after installing nodist actually points to v0.8.9.
Perhaps the chocolatey installation script is buggy?
edit: I tried to replace the node.exe that nodist uses internally with other versions.. and running node --version actually changed as well... So I do think that the C:\ProgramData\chocolatey\bin\node.exe is calling the wrong node.exe file
Also.. cinst nodist -pre fails on the first run most of time.. And a second run should use the file downloaded from the first attempt and continue to install.
--update
Here is a section of the install log from chocolatey:
20140704-23:31:53 [DEBUG] Looking for executables in folder: C:\ProgramData\chocolatey\lib\nodist.0.4.6-beta
Adding batch files for any executables found to a location on PATH. In other words the executable will be available from ANY command line/powershell prompt.
20140704-23:31:53 [DEBUG] Found 3 exe files to possibly generate.
20140704-23:31:53 [DEBUG] Found 'C:\ProgramData\chocolatey\lib\nodist.0.4.6-beta\tools\nodist-master\bin\node.exe' for batch redirect
20140704-23:31:54 [DEBUG] Running 'Generate-BinFile' for node with path:'C:\ProgramData\chocolatey\lib\nodist.0.4.6-beta\tools\nodist-master\bin\node.exe'|$useStart:False|$command:
20140704-23:31:54 [DEBUG] Calling C:\ProgramData\chocolatey\chocolateyinstall\tools\shimgen.exe -o "C:\ProgramData\chocolatey\bin\node.exe" -p "..\lib\nodist.0.4.6-beta\tools\nodist-master\bin\node.exe"
20140704-23:31:54 [CHOCO] Added C:\ProgramData\chocolatey\bin\node.exe shim pointed to '..\lib\nodist.0.4.6-beta\tools\nodist-master\bin\node.exe'.
20140704-23:31:54 [DEBUG] Found 'C:\ProgramData\chocolatey\lib\nodist.0.4.6-beta\tools\nodist-master\v\0.10.29\node.exe' for batch redirect
20140704-23:31:54 [DEBUG] Running 'Generate-BinFile' for node with path:'C:\ProgramData\chocolatey\lib\nodist.0.4.6-beta\tools\nodist-master\v\0.10.29\node.exe'|$useStart:False|$command:
20140704-23:31:54 [DEBUG] Calling C:\ProgramData\chocolatey\chocolateyinstall\tools\shimgen.exe -o "C:\ProgramData\chocolatey\bin\node.exe" -p "..\lib\nodist.0.4.6-beta\tools\nodist-master\v\0.10.29\node.exe"
20140704-23:31:54 [CHOCO] Added C:\ProgramData\chocolatey\bin\node.exe shim pointed to '..\lib\nodist.0.4.6-beta\tools\nodist-master\v\0.10.29\node.exe'.
20140704-23:31:54 [DEBUG] Found 'C:\ProgramData\chocolatey\lib\nodist.0.4.6-beta\tools\nodist-master\node.exe' for batch redirect
20140704-23:31:54 [DEBUG] Running 'Generate-BinFile' for node with path:'C:\ProgramData\chocolatey\lib\nodist.0.4.6-beta\tools\nodist-master\node.exe'|$useStart:False|$command:
20140704-23:31:54 [DEBUG] Calling C:\ProgramData\chocolatey\chocolateyinstall\tools\shimgen.exe -o "C:\ProgramData\chocolatey\bin\node.exe" -p "..\lib\nodist.0.4.6-beta\tools\nodist-master\node.exe"
20140704-23:31:54 [CHOCO] Added C:\ProgramData\chocolatey\bin\node.exe shim pointed to '..\lib\nodist.0.4.6-beta\tools\nodist-master\node.exe'.
20140704-23:31:54 [DEBUG] Evaluating NuGet output for line:
20140704-23:31:55 [CHOCO] Finished installing 'nodist' and dependencies - if errors not shown in console, none detected. Check log for errors if unsure.
So chocolatey creates the redirects automatically? But points to the wrong node.exe...
-Update:
ok... according to chocolatey wiki, for the .exe files to not be batch redirected, you have to have a file with .ignore suffix. So for each node.exe that is not supposed to be used, there has to be a node.exe.ignore in the same directory. I guess you need a node.exe.ignore next to the one nodist uses internally, and for each version of node fetched, create a node.exe.ignore file alongside it as well.
Hopefully this issue can be fixed soon and pushed onto chocolatey.
Detect x64 automatically
The chocolatey package could use this improvement, and it will be easier once some work-in-progress in chocolatey are done. Reference: #23
While looking into why nodist selfupdate
was not working for me, I discovered that files: nodist\bin\nodist
(sh) and nodist\bin\nodist.cmd
contain different logic.
For example, if I run nodist selfupdate
under Git Bash, rather than a vanilla Windows Command Prompt (CMD.exe), the entire nodist.cmd
file is skipped and nodist
gets executed immediately. So in this case, selfupdate
, gets passed to nodist\cli.js
, and it believes I'm trying to set the global Node version to "selfupdate", like you would with "stable" or "latest".
This errors with the message:
Version spec didn't match any available version.
Sorry.
If I write out the spec that's being used (#64):
nodist/lib/versions.js
...
if(!v) return cb(new Error('Version spec, "' + version_spec + '", didn\'t match any available version'));
...it comes out as
Version spec, "selfupdate", didn't match any available version.
Sorry.
Could the logic in nodist.cmd
be either;
nodist\bin\nodist
,nodist\cli.js
?I believe this would allow selfupdate
to work, as intended, under Git Bash.
I had a previous version of both node and npm on a WinXP box. I uninstalled node but not npm. Not sure if this was the issue. After cloning the repository, adding path and running 'nodist update', I'm getting this error:
module.js:340
throw err;
^
Error: Cannot find module 'osenv'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (C:\BAT\nodist\bin\node_modules\npm\node_modules\npmconf\config-defs.js:10:13)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
module.js:340
throw err;
^
Error: Cannot find module 'osenv'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (C:\BAT\nodist\bin\node_modules\npm\node_modules\npmconf\config-defs.js:10:13)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
A complete wipe and retry would be fine, but I'm not quite sure if it's necessary or exactly how to go about it. Just delete any 'npm_modules' folders I have? Thanks in advance for any help.
EDIT:
This is a non-issue. Complete removal of old npm allowed normal installation. Sorry for the panic button mode. Please close.
C:\Documents and Settings\Administrator>npm install -g nodist
npm http GET https://registry.npmjs.org/nodist
npm http 304 https://registry.npmjs.org/nodist
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/wordwrap
> [email protected] install C:\Documents and Settings\Administrator\Application Data\
npm\node_modules\nodist
> copy bin\bin.cmd %npm_config_prefix%\nodist.cmd
The syntax of the command is incorrect.
> [email protected] preuninstall C:\Documents and Settings\Administrator\Application
Data\npm\node_modules\nodist
> del %npm_config_prefix%\nodist.cmd
The system cannot find the path specified.
npm WARN continuing anyway [email protected] preuninstall: `del %npm_config_prefix%\n
odist.cmd`
npm WARN continuing anyway `cmd "/c" "del %npm_config_prefix%\\nodist.cmd"` fail
ed with 1
npm ERR! [email protected] install: `copy bin\bin.cmd %npm_config_prefix%\nodist.cmd`
npm ERR! `cmd "/c" "copy bin\\bin.cmd %npm_config_prefix%\\nodist.cmd"` failed w
ith 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the nodist package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! copy bin\bin.cmd %npm_config_prefix%\nodist.cmd
npm ERR! You can get their info via:
npm ERR! npm owner ls nodist
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 5.1.2600
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "nodist"
npm ERR! cwd C:\Documents and Settings\Administrator
npm ERR! node -v v0.8.1
npm ERR! npm -v 1.1.33
npm ERR! code ELIFECYCLE
npm ERR! message [email protected] install: `copy bin\bin.cmd %npm_config_prefix%\nod
ist.cmd`
npm ERR! message `cmd "/c" "copy bin\\bin.cmd %npm_config_prefix%\\nodist.cmd"`
failed with 1
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Documents and Settings\Administrator\npm-debug.log
npm ERR! not ok code 0
Please help.
Thanks!
Followed the instructions on the front page:
git clone
add bin directory to path
run 'nodist update'
I get:
C:\dev>nodist update
1 file(s) copied.
module.js:340
throw err;
^
Error: Cannot find module './polyfills.js'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (c:\Dev\nodist\bin\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:8:1)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
1 file(s) moved.
Install dependencies...
module.js:340
throw err;
^
Error: Cannot find module './polyfills.js'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (c:\Dev\nodist\bin\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:8:1)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
Installing latest stable version...
module.js:340
throw err;
^
Error: Cannot find module 'mkdirp'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (c:\Dev\nodist\lib\nodist.js:27:18)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
... since bin's arent in PATH
Don't install node beforehand!
Two questions: why, what?
Documentation lacks explanation on drawbacks when node.js is already installed with a binary.
Should be node.js uninstalled before using nodist?
Place the code in a directory for use. It is not recommended to use Program Files since you will need to run all your commands in administrator mode. Instead use c:/nodist or similar.
What if nodist
will be installed to %HOMEDRIVE%%HOMEPATH%\.nodist
, the same place where .nvmw
is installed by default without clattering the %HOMEDRIVE%
why not add instructions to set system wide environment variable with setx
, e.g.:
setx /M PATH "%HOMEDRIVE%%HOMEPATH%\.nodist;%PATH%"
Thanks
In Windows 7 Professional
cd C:\nodist\bin
nodist
Output: \Microsoft was unexpected at this time.
This happens regardless of any arguments I've tried, such as --help
or + 0.8.6
Per the installation instructions, I've also tried adding C:\nodist\bin\ to my system path. Same result, except I can reproduce the error no matter what my current working directory is.
I get the following error.
/../node.exe: No such file or directory/cygdrive/c/nodist/bin
It's a minor issue really, works fine through CMD.
This would require the implementation of something very much like nodenv's shim:
https://github.com/OiNutter/nodenv#understanding-shims
(I tried this with a batch file before, but it turned out it doesn't work that well with deamons and that kinda stuff)
.node-version files are convenient and very useful, though.
If anyone wants to look into it, feel free
(@fschwiet ;) )
I'd love to download a single nodist-0.3.11.setup.exe
file, which I only have to run to be guided through a simple installation. Asking me on the way if I'd like x64 for example.
Running nodist latest
, will fail, if it cannot access the internet to get the dist/
list.
Generic version specifications should fallback to the locally installed latest
and latest stable
versions.
Using nodist r 0.8.1
, should enter the REPL, e.g., but it doesn't.
nodist r 0.8.1 -- -v
, does not always print the current version, but exits silently.
Looking for a different approach to the current implementation.
D:\git\dcc\dcc-setup>nodist v0.10.13
0.10.13
D:\git\dcc\dcc-setup>node -v
v0.10.13
D:\git\dcc\dcc-setup>npm -v
1.3.7
D:\git\dcc\dcc-setup>npm install pm-notify
npm http GET https://registry.npmjs.org/pm-notify
npm http 304 https://registry.npmjs.org/pm-notify
> [email protected] preinstall D:\git\dcc\dcc-setup\node_modules\pm-notify
> node-gyp rebuild
D:\git\dcc\dcc-setup\node_modules\pm-notify>node "C:\Users\adriano.raiano\.nodist\bin\node_modules\n
pm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp http GET http://nodejs.org/dist/v0.8.9/node-v0.8.9.tar.gz
gyp http 200 http://nodejs.org/dist/v0.8.9/node-v0.8.9.tar.gz
gyp http GET http://nodejs.org/dist/v0.8.9/node.lib
gyp http GET http://nodejs.org/dist/v0.8.9/x64/node.lib
gyp http 200 http://nodejs.org/dist/v0.8.9/node.lib
gyp http 200 http://nodejs.org/dist/v0.8.9/x64/node.lib
Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parallele Erstellung zu er
möglichen, müssen Sie den Schalter "/m" hinzufügen.
pm.cpp
pm_win.cpp
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): warning C4530: C++ exc
eption handler used, but unwind semantics are not enabled. Specify /EHsc [D:\git\dcc\dcc-setup\node
_modules\pm-notify\build\pm.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cstdio(48): warning C4995: 'gets': n
ame was marked as #pragma deprecated [D:\git\dcc\dcc-setup\node_modules\pm-notify\build\pm.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cstdio(52): warning C4995: 'sprintf'
: name was marked as #pragma deprecated [D:\git\dcc\dcc-setup\node_modules\pm-notify\build\pm.vcxpr
oj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cstdio(55): warning C4995: 'vsprintf
': name was marked as #pragma deprecated [D:\git\dcc\dcc-setup\node_modules\pm-notify\build\pm.vcxp
roj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cstring(21): warning C4995: 'strcat'
: name was marked as #pragma deprecated [D:\git\dcc\dcc-setup\node_modules\pm-notify\build\pm.vcxpr
oj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cstring(22): warning C4995: 'strcpy'
: name was marked as #pragma deprecated [D:\git\dcc\dcc-setup\node_modules\pm-notify\build\pm.vcxpr
oj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cwchar(30): warning C4995: 'swprintf
': name was marked as #pragma deprecated [D:\git\dcc\dcc-setup\node_modules\pm-notify\build\pm.vcxp
roj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cwchar(31): warning C4995: 'vswprint
f': name was marked as #pragma deprecated [D:\git\dcc\dcc-setup\node_modules\pm-notify\build\pm.vcx
proj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cwchar(33): warning C4995: 'wcscat':
name was marked as #pragma deprecated [D:\git\dcc\dcc-setup\node_modules\pm-notify\build\pm.vcxpro
j]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\cwchar(35): warning C4995: 'wcscpy':
name was marked as #pragma deprecated [D:\git\dcc\dcc-setup\node_modules\pm-notify\build\pm.vcxpro
j]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): warning C4530: C++ exc
eption handler used, but unwind semantics are not enabled. Specify /EHsc [D:\git\dcc\dcc-setup\node
_modules\pm-notify\build\pm.vcxproj]
C:\Users\adriano.raiano\.node-gyp\0.8.9\deps\v8\include\v8.h(178): warning C4506: no definition for
inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::Handle<T>)' [D:\git\dcc\dcc-setup\no
de_modules\pm-notify\build\pm.vcxproj]
with
[
T=v8::Object
]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string(757): warning C4995: 'swprint
f': name was marked as #pragma deprecated [D:\git\dcc\dcc-setup\node_modules\pm-notify\build\pm.vcx
proj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string(766): warning C4995: 'swprint
f': name was marked as #pragma deprecated [D:\git\dcc\dcc-setup\node_modules\pm-notify\build\pm.vcx
proj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string(775): warning C4995: 'swprint
f': name was marked as #pragma deprecated [D:\git\dcc\dcc-setup\node_modules\pm-notify\build\pm.vcx
proj]
C:\Users\adriano.raiano\.node-gyp\0.8.9\deps\v8\include\v8.h(178): warning C4506: no definition for
inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::Handle<T>)' [D:\git\dcc\dcc-setup\no
de_modules\pm-notify\build\pm.vcxproj]
with
[
T=v8::Object
]
Creating library D:\git\dcc\dcc-setup\node_modules\pm-notify\build\Release\pm.lib and object D
:\git\dcc\dcc-setup\node_modules\pm-notify\build\Release\pm.exp
Generating code
Finished generating code
pm.vcxproj -> D:\git\dcc\dcc-setup\node_modules\pm-notify\build\Release\\pm.node
npm http GET https://registry.npmjs.org/bindings/1.1.0
npm http 304 https://registry.npmjs.org/bindings/1.1.0
[email protected] node_modules\pm-notify
└── [email protected]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.