Node inspector doesn't start - node.js

I run NodeJS Express server on 127.0.0.1:3000 and trying to debug it with awesome (when it works) Node Inspector but having trouble starting it after the update. I used to run version of Node Inspector 0.7.4 with node-debug server.js with no problems. Then I wanted to update it to latest 0.10.0 and went npm update -g node-inspector but now when I run node-debug server.js blank page opens in browser with url http://127.0.0.1:8080/debug?ws=127.0.0.1:8080&port=5858 and nothing happens. I tried node-debug --web-host=127.0.0.1:3000 with no luck.
How can I debug my my Node programs now? BTW I'm on Ubuntu.
EDIT:
I had no luck running latest version 0.10.0 so I had to uninstal and install 0.9.2. Node inspector started with no problem then. I run 0.10.0 on my mac but on Ubuntu it doesn't seem to work for some reason so going back to 0.9.2 was only solution. I hope this will help some Ubuntu users.

Use Chrome 42.0.2311.152-1 with node-inspector v0.9.2 or higher to fix this problem on Ubuntu 14.04.
See here: https://github.com/node-inspector/node-inspector/issues/697

Related

npm does not support Node.js v13.14.0

Hello hope you are well!
I try to install a project react in my pc so I started to install npx create-next-app hulu-2-yt.
but me display this error in my cmd.
npm does not support Node.js v13.14.0
You should probably upgrade to a newer version of node as we can't make any promises that npm will work with version.
I try to make upgrade for Last version of the nodejs but I have windows 7 and said me that can not support for windows 7.
Do you have any solution.
You should upgrade node manualy all you have to do uninstall the old node version and watch this video Installing Latest Node and React In windows 7 or Low End PC is helped me lot to resolve the problem i hope it working for you as well.

Node version different when using NPM

I tried to find a duplicate question, there are similar ones but I still don't understand what's going on..
I just installed node and npm on Ubuntu 20.04 with
sudo apt install nodejs npm
And followed the Electron quick start tutorial, and added this line to the beginning of my main.js:
console.log("node version: " + process.versions["node"]);
When I run my app with npm start, I see (both on the console and on the app) node version 16.13.0, but when I run the app with node main, I see the version as 10.19.0, which is also what node -v shows.
I can probably "fix" this issue by updating node, but I would like to understand what is going on here.. Is NPM using a different node version or something?
Thanks
Edit
I tried this with an empty node app, just made npm init and set start: "node index.js" in package.json, this time both node index.js and npm start show the same version (10.19.0) so I'm guessing Electron is somehow reading a wrong node version?
#DJHemath is spot on. Electron has Node and Chromium as internal libraries. IE: Node is a module of Electron.
Therefore, the version you are seeing within your Electron application is the Node version that is bundled with Electron.
When Electron is updated, the versions of Node and Chromium are often updated as well. An overview of this can be seen on the Electron homepage "Releases" cards (latest, beta, alpha and nightly).
Additionally, for historical purposes, version updates of these two dependencies can be seen on the Stable Releases page.
Thus, in summary, changing your system's installed Node version will not affect the version of Node used within your Electron application(s).

http-server with localhost:3000 gives ERR_INVALID_REDIRECT

I have installed http-server using the following command:
npm i -g http-server
Upon running the server I get the response saying Running on 127.0.0.1:8080
My call looks like this:
http-server -a 0.0.0.0 -c-1
If I go to 127.0.0.1:8080 or 10.1.1.72:8080 I get:
This page is not working.
127.0.0.1:8080 sent an invalid response
ERR_INVALID_REDIRECT
I have googled and searched everywhere with no answer as to what actually solves this. I'm not using XAMPP or IIS just a blank node server.
Node.js: 11.12.0
npm: 6.7.0
OS: Windows 10
I have checked my host files, there is nothing relevant there. I have no idea what would be causing this. I don't use .htaccess files or Web.config files either.
Notes
If I go to localhost:8080/index.html I can get to my app. This isn't supposed to work like that though.
Try downgrading the http-server version as the latest version (0.10.0 and 0.11.0) is causing issue due to ecstatic (3.3.2).
Try uninstalling the current http-server version and then try to install 0.9.0 or older version
Uninstall
npm uninstall -g http-server
Install
npm install http-server#0.9.0
This is still an open issue with http-server, which is supposedly caused by the latest version of one http-server's dependencies called ecstatic:
https://github.com/http-party/http-server/issues/525
There are three workarounds for this at the point:
Point the browser to localhost:8080/index.html instead of just http://localhost:8080.
Downgrade your http-server version to 0.9 from 10.0
npm uninstall -g http-server
npm install http-server#0.9.0
Open package.json file under the http-server module and downgrade ecstatic dependency
to 3.3.1 (found under 'dependencies' key).
I'm having the exact same problem. Just installed both node and http-server globally. run http-server and it gives me the following error when accessing localhost:8080:
"ERR_INVALID_REDIRECT"
If I try to access the index.html page, it works. It doesn't even show directories listing, even with -d in the command line.
I got something, though: installing an older version of http-server and it loads the index.html automagically :)
This was the command/version: npm install -g http-server#0.8.5
Anything newer (0.9.0+) and it breaks again.
Edit:
Even then, it will only work on sub-folders, not on the root. For example:
http://localhost:8080/mypage/ will load index.html automatically.
http://localhost:8080/ won't
This issue is fixed in version 0.12.0, make sure you're upgraded by running
npm install --global http-server
If you use npx http-server it should use the latest version automatically.
I changed http-server version 0.10.0 to 0.8.5 in the package.json file and it worked for me. I hope this helps someone.
pass url "0.0.0.0" when you are creating server and then try.

Node JS 6.9 and angular CLI version compatibility

I have a restriction of using node JS version 6.9.1. I am getting many problems, while using angular cli quick start steps.
after ng serve, browser page will be white, no error in console.
npm start works, but if i change some style/file browser do not not refresh.
if i make any style change, webpack compiled successfully message comes but webserver fails to load page.
When I follow the quick start steps with latest nodejs it works like a charm. Can any one help me in telling, what are the versions (npm, angular-cli), I should use to run it ?
Like
Each Angular/Cli version has limited its compatibility of node versions below a specified release. If you have to use a specific version of node then your best bet would be to find a previous version of the Angular/Cli that will play nicely.
Here you can find all the versions and from there, pick one a little further back in the list and then do a search in google for "Angular/cli version x.x.x node compatibility" to see if there are any known issues.
Once you pick a version that looks good, run
npm install -g #angular/cli#<your version number>.
Once the install is complete run ng help and you'll get feedback right away if the version is still incompatible and you can try a different version.
Just make sure you get rid of the installs you aren't using with npm uninstall -g #angular/cli#<your version number>
for see if angular-cli is compatibility whit your node version installed you can see https://www.npmjs.com/package/#angular/cli/v/6.0.8?activeTab=versions, for example, I have installed node 6.11.2 and I have to use: npm install -g #angular/cli#6.0.0

How to install node-inspector on windows 7?

I have tried a lot to install node-inspector for debug node.js code but i got a
bunch of errors on command prompt while installing node-inspector. I am using
node version is 0.12.5 and npm version is 2.11.2.please guide me how to install
node-inspector and also tell me the way for debug node.js code.

Resources