I am new to nodejs and i am trying to use that with visual studio code editor. I am unable to install any packages. Getting this below error. I think its something to deal with proxy.
I have tried couple of solutions provided (e.g. changes the npm config etc) over the web but nothing seems to working
if you are behind a proxy it wont work you out.use this code
npm config set proxy http://myproxyblabla:myport
Related
I have spent my whole day on fixing this problem but can't see any light.
My node and npm version is below
And no matter what package I wanna install, it always show
I am sure that I am not in any proxy and I have already lower my node version from 18 to 14,
but the problem still exist!!!!
Could anyone know how to fix this problem help me?
I already tried every way to fix this but can't work.
Since when did the issue start? Did it occur after you installed any dependency or made any proxy / firewall related configurations?
However you can try one of the following ways to fix this issue
Delete node_modules folder and in terminal, write
npm install
Change your nodejs version, either upgrade it or downgrade it
Reinstall nodejs
Try some other package manager like yarn
Note: When changing your nodejs version, please ensure that your node version is compitable with the npm version
Edit:
If these solutions don't work, the error is most probably caused by network related issues, you can try the following fixes
In terminal, reset the registry path of your node package manager
npm config set registry http://registry.npmjs.org/
If you are using your organization's computer, you need to use a proxy, remember to change the proxy url and port as per your organization
npm config set proxy http://proxyurl.com:8080
npm config set https-proxy http://proxyurl.com:8080
Instead of local installation, try installing packages globally i.e
npm install -g mongoose
Clear the cache
npm cache verify
Switch your device to some other wifi network and then try installing some npm packages
I'm going through a basic tutorial on how to create a Node.Js project in Visual Studio. I create the project and there is an "npm" folder with some packages listed such as : body-parser, cookie-parser, etc. They all have "(missing)" next to them. I've gone through this new project setup a few times. Sometimes when I right click on the package the "Install npm Package" is greyed out. Sometimes it isn't. When it isn't and I select "Install npm package", it does absolutely nothing.
This is a new project. There is no Git repository or anything. This is literally just a new Node.js project straight out of the box. Does anyone know why these npm packages are missing or why I can't install them?
I found this, which isn't related to Sisual Studio, but someone trying to install express via the command line:
npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
I found some stuff in the logs about a local cert not found. I had to run npm config set strict-ssl and suddenly it worked.
An alternative answer that was suggested is the following, if you are looking for a better long-term solution:
npm config set registry http://registry.npmjs.org/
We've recently upgraded our project Meteor version to v1.8.2, however when running the following command: meteor update --all-packages, were encountering some strange errors. Here's an example of one the errors:
=> Errors while initializing project:
While loading package angular-compilers#0.3.4:
error: Command failed: C:\Windows\system32\cmd.exe /c
E:\Applications\Meteor\.meteor\packages\meteor-tool\1.10.2\mt-os.windows.x86_64\dev_bundle\bin\npm.cmd rebuild --update-binary
Cannot download "https://github.com/sass/node-sass/releases/download/v4.7.2/win32-x64-72_binding.node":
HTTP error 404 Not Found
Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.
export HTTP_PROXY=http://example.com:1234
or configure npm proxy via
Some additional information:
After checking the logs, it seems the meteor tool were using is 1.10.2. Does using the latest meteor tool for a v1.8.2 project cause issues?
1 verbose cli 'E:\\Applications\\Meteor\\.meteor\\packages\\meteor-tool\\1.10.2\\mt-os.windows.x86_64\\dev_bundle\\bin\\node.exe',
Any ideas what's wrong?
Thanks!
Can you post the full logs from meteor update?
Are you using fourseven:scss? Because it installs it’s own version of node-sass which is likely the problem.
Have a look at the version compatibility table here: https://github.com/Meteor-Community-Packages/meteor-scss
And check that the version of fourseven:scss matches a compatible meteor version.
The alternative is to remove it, update and install the atmosphere package again, that way it won’t get in the way of the updater’s dependency resolver
Note that if you are using fourseven:scss, there’s no need to have node-sass in package.json.
i am not able to start angularJS2 project in visual studio sitting behind a proxy server. the following steps which i have done are
installed node.js - v6.9.4
npm version is 3.10.10
set the npm config as
npm config set https-proxy=http://username:password#companyAddress:8080
and also tried this
npm config set https-proxy=http://"username:password"#companyAddress:8080 and also
i have a package.json file which was downloaded from here package.json file downloaded link
now when i run the following command in the command prompt, navigating to the folder of my project, intially i get a loader like this
then it returns a error like this
I have even tried this npm config set proxy "http://domainName%5Cusername:password#company.com:8080/" as suggested here but it didnt work
I have tried all the blogs mentioned in stackoverflow as well as github, but nothing goes beyond the following steps and nothing resolved my issue.
I have recently installed latest version of nodejs (6.3.1) with npm version 3.10.3. I am not able to install any node package using npm install command. Initially I thought it might be related with my office network firewall settings, but I am getting similar issue on my home network. Please see attached image for error details.
Appreciate if someone can help me to find a resolution.
npm config had bad network settings. So although I had disabled the main proxy / firewall etc. all npm commands were always going through that bad proxy. Managed to remove those bad entries finally, phew! :)