TermKit
TermKit copied to clipboard
Error: require.paths is removed, use node_modules folders or The NODE_PATH environment variable instead
When running nodekit.js, it gets the following error: "Error: require.paths is removed, use node_modules folders or The NODE_PATH environment variable instead"
+1, I'm new to node and don't know what to do. So TermKit is broken out of the box, for me.
This would be the first time that I've used node, but did you run, or add the following in your .bashrc?
export NODE_PATH="/usr/local/lib/node"
Part of the brew install mentions that this needs to be added.
"Please add /usr/local/lib/node_modules to your NODE_PATH environment variable to have node libraries picked up."
Thanks, but this doesn't solve the problem. It seems that other people are having the same issue too: https://github.com/visionmedia/express/issues/902
I am running it on Windows, i've edited the files and solved this issue, but worker.js gets an error, somethink like "Bad Argument".
On Thu, Dec 15, 2011 at 7:10 AM, Nathan B < [email protected]
wrote:
Thanks, but this doesn't solve the problem. It seems that other people are having the same issue too: https://github.com/visionmedia/express/issues/902
Reply to this email directly or view it on GitHub: https://github.com/unconed/TermKit/issues/68#issuecomment-3156521
Nick Shvelidze https://plus.google.com/109510926758335973804/posts Student, Web Developer Tbilisi, Georgia Twitter: @shvelo96 http://www.twitter.com/shvelo96 Find me on Facebook http://www.facebook.com/shvelo96
New to node as well, but it seems as if TermKit is designed to work out of the box with a 4.xx version of node, as the require.paths function has been removed in all 5.xx releases. This isn't a big deal, as you can just add the correct directories to your node_path and comment out the require.path function in nodekit.js.
But after doing this, It also seems that I'm missing the protocol module, which doesn't have a 5.xx compatible version and doesn't seem to be maintained any longer: https://github.com/Gozala/protocol. Ultimately I installed nvm and used a sandboxed version of node 0.4.12. After installing socket.io and protocol I eventually got TermKit up and running.
why they not update it to work with new version of node?
As noted in my previous comment, it likely has something to do with the fact that the protocol project is no longer maintained for newer versions of node... Ultimately this is supposed to be a standalone app, though, so hopefully the node.js env/reqs are in the process of being removed anyhow ;)
Any idea when the issue will be fixed or if there are other workarounds than having a previous version of node installed again?
Same problem here, I had problems with old versions of node.js and I would rather stay with the latest version only. Would be glad if this is issue is put in some milestone :) Thank you
I comment the line
// require.paths.unshift(__dirname + '/../Shared/');
Then run this
NODE_PATH=`pwd`/../Shared/ node nodekit.js
Instead of
node nodekit.js
We hope the author can update this project...
Comment out any lines in the source that uses require.paths, then set your NODE_PATH env to all the necessary folders like so,
cd TermKit; export NODE_PATH=`pwd`/Shared/:`pwd`/Node/:`pwd`/Node/shell/:`pwd`/Node/view/
In addition, for whatever reason the javascript source is using the RegEx object incorrectly all over the place. I don't know if this worked in the older version of node, but RegExp objects are being evaluated simply by treating them as a function (i.e. /[0-9]/(test)). I had to do a find and replace on misc.js, shell/meta.js, and shell/formatter.js to replace all instances of these with the correct use of the exec() method (i.e. /[0-9]/.exec(test)). I can submit a patch of my changes if anyone wants them.
I got this project working on Node v0.6.8.
Working on a fix for this now
Fixed here: https://github.com/derDoc/TermKit/commit/71df2a4b3713417e4035f0d736882f9f964bb24d
But how to apply it ?
I tried git pull but nothing changed.
Would be nice the owner of the project pull request #71 :)
Hasn't been updated for two months :(
Ping!
Found this after I got the require.paths error.
Please pull the fixes the nice hackers coded! :D
Guys,
I'm still getting that error in the newest version.
node.js:201 throw e; // process.nextTick error, or 'error' event on first tick
Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead.
Any ideas how to solve that?
Same here running node v0.6.11
node.js:201 throw e; // process.nextTick error, or 'error' event on first tick ^ Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead.
Same here when i use cocos2d-javascript
node.js:201 throw e; // process.nextTick error, or 'error' event on first tick ^ Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead.
Alright everyone I think we've established that this is an error with latest versions of node - no need to abuse the github notifications.
Sorry Contra no intention to abuse these notifications, fixed by setting up NODE_PATHS correctly - thanks
npm install protocol npm install socket.io
File nodekit.js :
//require.paths.unshift(__dirname + '/../Shared/');
and replace "io = require('socket.io-node')," by "io = require('socket.io'),"
The repository have changed
But I have a new problem:
TermKit/Node/node_modules/protocol/core.js:99 method[':this-index'] = signature[key].indexOf(protocol) ^ TypeError: Object #<SocketNamespace> has no method 'indexOf'
Environment path update for Windows user (yes those still exist):
export NODE_PATH="C:\Users\IMarek\AppData\Roaming\npm\node_modules"
I explained bit more on: http://blog.i-evaluation.com/2012/09/17/error-cannot-find-module-express/
after fixing this problem i see in node log only:
info - socket.io started
and it freezes, any ideas?
@actionless same here. updates?
@tekknolagi don't tried it for very long time so don't know
Still doesn't work even after setting export NODE_PATH="/usr/local/lib/node"
Error: require.paths is removed. Use node_modules folders, or the NODE_PATH environment variable instead.
at Function.Object.defineProperty.get (module.js:388:11)
at Object.
[bran@localhost termkit-git]$ sudo updatedb;locate termkit|grep bin /usr/bin/termkit /usr/lib/node_modules/termkit/node_modules/socket.io/support/expresso/bin /usr/lib/node_modules/termkit/node_modules/socket.io/support/expresso/bin/expresso
This is still a problem and this repository seems dead.
That is not the dead which can eternal lie And with strange aeons even death may die
Ia Ia! Cthulhu Fhtagn!