Node and cordova mismatch - node.js

I'm trying to work on a really old cordova project(cordova 4.2.0) in Windows. In order to build the project I need an appropriate Node version.
I have tried a few versions from the distributions page by basically hit and trial but in vain. The error is the same.
404 for cordova repository www
Which version of node would work with cordova 4.2.0?
Screenshot here:

You have installed cordova 4.0.0 on machine, but your project requires and try to download 3.6.3, but that version is no longer present on npm package.
Use
npm show cordova#* version on console to show all available versions of Cordova, then upgrade your project to the nearest one (es. 4.0.0).

Related

NPM Install 404 Resource

after this command:
npm install node-sass
it throws this error:
Cannot download
"https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-57_binding.node":
I'm using the Node.js command prompt, I did npm update 5 times, it still tries to download from a 404 repo... i found the working repo requested node but I can't find how to download it manually and start the installation from there, thanks for Your help, I'm using Windows x64.
As their documentation says:
If you see a 404 when trying to install node-sass, this indicates that your trying to install a version of node-sass that doesn't support your version of NodeJS, or uses an alternate V8 environment (Meteor, Electron, etc...) that isn't supported by node-sass.
If you encounter this, please check what version of NodeJs you're running (node -v) and check for a supported version of node-sass for your NodeJs by checking our release page.

Cant get the right NPM version from the latest nodejs LTS installer

I use a Windows 10 x64 Pro machine as a development environment.
Today I went to the Node.js site, (nodejs.org/en/download) to get the LTS version which is 8.11.4 for Node and includes npm 5.6.0. This information is visible at the top of the page.
After installation, I did the command "node -v" and actually this gives me v8.11.4 as result. On the other hand the same command for npm "npm -v" gives me version 2.15.10.
What troubles me is that different documentation suggests that the update is done by installing the latest version, which I did, with the result that I have; the wrong NPM version.
I need at least NPM version 3.x or higher. As a lead already explored without success;
- clean installation from the original site by choosing the LTS version, branch x64
- uninstalled the version and reinstalled
Is it a known bug or is there another avenue to explore?
The short version is: VS 2017 installs a really old version of NPM.
By doing the following command in powershell "npm config get prefix" I could see that the prefix was pointing to Microsoft. Then I used the "npm-windows-upgrade" tool to get the installer path for VS. From there I navigated to the bin folder and launched the JavaScript file to start the update.
VS2017 looks to use version 2.15.10.
The path to it is c:users{userprofile}.mpmrc
I just deleted this file and all ran fine (i'm not using VS).

Angular5 node js and npm installation problems

I have the latest versions of Node and NPM installed, using which I installed Angular/cli, but it's shooting me with following errors: angular/cli and npm versions not compatible with current version of node.
I suspect that I may(not) be installing out of the proper directory. But at this point, what else can I do? thanks.
Please check: Screenshot with details of the issue
I also faced a similar problem, but the solution was quite simple : my path was too long.
I shortened it a bit (two directories down) and then I did the install again with success.
Here are the reqs.
Both the CLI and generated project have dependencies that require Node 6.9.0 or higher, together with NPM 3 or higher.
You are using the latest node.js 9.2
you need to uninstall or rollback to 8.9 !!
Here is a guide
https://github.com/angular/angular-cli
Hope this solves it for you.
I faced a similar problem with angular/cli version not compatible with the current node version. This generally happens when you are upgrading from lower version of Angular to any other higher version.
You can try following steps:
npm outdated --> To list latest and current package details in local application.
npm update --> to update the local packages.
If it still doesn`t work,
Try deleting the 'node_modules' folder and install dependencies of fresh:
npm install
You can then check whether all packages, including the cli is not outdated.

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-sass and gulp-sass?

I have trouble with installing dependencies in my project. Gulp-sass version is 2.0.4. When I try to install with npm install I'm getting error 404 with node-sass v3.13.1. There is no link for it. I've also tried to insert source file of node-sass v3.13.1 but it's not working. I know the trouble is with link, but is there any way to get around this?
Node-sass is a c++ bridge so particular versions are only supported for some versions of NodeJS. In this case, you are running a new version of Node, that older version node-sass doesn't support. Newer versions also provide better error messages for this.

Resources