@anirban-dutta I use command like this npm install git+https://github.com/me-cooper/nodebb-plugin-makesmart-gallery.git when repo is not recognized by npm install
Just remember to add .git at the end of github repo url.
Old but could be relevant.
I think this case is very similar to the one i'm facing. I'm trying to reproduce the error on console, and even i'm not able to, i would swear that i have seen the same error on console yesterday :S.
yeah im having the same EADDRINUSE error when trying to run NodBB in debugger mode (WebStorm)
Could be possible to disable the minifier process during the startup of the debbugger? I suppose is started from nodebb engine, isn't it?
I'm referring to this process: /usr/bin/nodejs --debug-brk=49749 --nolazy --debug minifier.js
I would love a solution or a workaround because I've been trying for a couple days to try and get this working. I just want to be able to debug NodeBB's plugins and core components
PS. I've tried WebStorm, node-inspector and strong-cli. I've tried them all with latest node.js and also version 0.10
@agarcia17 do you get the EADRRINUSE with all of them?
@José-Ángel-Rey-Liñares yeah same error with all of them
Anyone could provide any details, guides or something related to debug node.js applications using mentioned tools or different ones? What about expecifically nodebb? How do you debug your plugins/nodebb developments? Do you only use logs or use another kind of tools?
Thanks in advance.
I'm using PHPStorm/Intellij Ultimate and the only way it seems to work for me (on Windows, can't remember if it worked on OS X) is to use a remote Node.js debugging session. If I don't do this, it get's stuck on the minifier stage.
Here is my run configuration and there is my remote debug configuration. These are configurations in a plugin project so this only allows your to debug your project files. To debug NodeBB modules you have to run/debug from the NodeBB project.
After that you just run the Run configuration and debug the remote debug configuration when needed.
FYI: Visual Studio Code worked with debugging right out of the box.
@Schamper thanks you very much! I would give a try to the remote debugging on webstorm. And could try the Visual Studio approach too. Thanks again!
@José-Ángel-Rey-Liñares note that only Visual Studio Code works right out of the box, Visual Studio itself does not.
@Schamper I have just tried Visual Studio Code, and i keep getting the same error EADDERINUSE. Could you tell me what version of node are you running? Thanks!
@José-Ángel-Rey-Liñares I was getting the same error with the master version of NodeBB then I tried a fresh install of NodeBB 0.7.x and got it working without changing any settings
PS. I'm using Visual Studio Code 0.3.0
@agarcia17 thanks, will give it a try.
@agarcia17 i've just tried with visual studio code 0.3.0 and nodebb master on commit 96526a37a3cd64a866f3fc14a71cc327234d9a7d. And i'm getting the same EADDERINUSE; maybe could you point something I miss?
I've been struggling with this all day and no luck.
Even when I run from the command line I still get the error:
@Fidelix same here.
Apparently this happens when NodeBB uses async.parallel().
If you disable the minifier, the error will happen with the templates system, sound system, and so on.
Sorry for bumping this up, but i haven't managed to get any of the suggested debug tools working with nodebb.
Has someone managed to use them recently? Any help?
So, I hope I'm not speaking too soon, but this should get you guys up and running (OSX Yosemite)
So far what I've done is:
upgrade to node 0.12.5 (0.12.x should be sufficient)
if like me you had already installed node-inspector and nodeBB prior to upgrading to node 0.12.x, you'll have to rebuild your node packages:
npm install -g node-inspector) so I had to go to
Start nodebb in development mode: (in NodeBB root dir):
In a new terminal, run
node-inspector & (spins up as a background process, so if something goes wrong, use
ps aux | grep node-inspector to find the pid and kill it)
this will output something like
Visit http://127.0.0.1:8080/debug?ws=127.0.0.1:8080&port=5858 to start debugging.
Press enter to get back to the command line
ps aux | grep app.js:
brian 79177 0.0 0.0 2432772 660 s006 R+ 10:03PM 0:00.00 grep app.js brian 79089 0.0 1.1 3763608 183804 s005 S+ 9:41PM 0:04.91 /usr/local/Cellar/node/0.12.5/bin/node app.js
the pid for NodeBB is 79089 in my case, so I just send a
kill -s USR1 79089 and you should see this in the terminal where you spun up ./nodebb dev:
Starting debugger agent. Debugger listening on port 5858
Go load the address you got from node-inspector in your browser ^ (it might take a second to load)
Set a breakpoint somewhere (that you know how to hit) and you should be up and running!
Now you can also just ctrl-C to quit the nodeBB process. If you want to start it again:
ps aux | grep app.jsto find the pid again
kill -s USR1 <pid>to the new pid of the running nodebb instance, and refresh the browser window that had the debugger open originally