How to install node-sass and gulp-sass? - node.js

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.

Related

NPM active-win package with NODE_MODULE_VERSION 106

I'm working on a little Electron.js app. I want to get information about active window so I came across npm package active-win. I get it working at Linux and OSx without problem, but on Windows I get version error.
UnhandledPromiseRejectionWarning: Error: The module '\\?\C:\...\git\in_sane_factory\desktop-app\node_modules\iconv\build\Release\iconv.node'was compiled against a different Node.js version using
NODE_MODULE_VERSION 108. This version of Node.js requires
NODE_MODULE_VERSION 106. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
The iconv package is needed for active-win in version above 2. Highest version and default to install is 2.3.5. Only other version that I manage to install was 2.3.4 and that did not solve anything.
I tried to npm install, npm rebuild, cloning iconv repository and installing this version manualy via npm install <path>.
I tried to install the right version of Node.js but by official version table, there is no version 106. I only manage to upgrade from 93 to 108.
I'm not really skilled Node.js user and now I'm trully hopeless. Do you have any advice or idea, what may solve this?
Sources:
My APP: https://gitlab.com/insanefactory/desktop-app
iconv NPM: https://www.npmjs.com/package/iconv
active-win NPM: https://www.npmjs.com/package/active-win
ref-wchar-napiNPM: https://www.npmjs.com/package/ref-wchar-napi
NPM releas version table: https://nodejs.org/en/download/releases/
Node.js version or version of package was not the issue in the end. After a few weeks I found out, where I was wrong. All needed to fix it was installing electron-rebuild and then running simple .\node_modules\.bin\electron-rebuild.cmd.
Hope, if you come across similar problem, this can help you as well.
I think you are basically running a different nodejs version on your windows machine. Cross check with the version on your Mac to confirm.

npm installing wrong version of anuglar(8.1.0)

when i run the following command, it shows 6.4.1.
npm run ng --version
but when i am running the following command, it is installing 8.1.0 and getting error. i do not understand how it is happening.
npm install -g #angular/cli
i tried the following commands. but it is not working
npm cache clean --force
npm install -g #angular/cli
Error Screen
My Requirement:
Angular 6
how can i resolve this?
You should the latest (12+) node when upgrading to angular 8. You can download it from here.
After upgrading node, the issues should go away.
For simple use cases and thanks to the work done in Angular 8, you can upgrade to the latest release using one command:
$ ng update #angular/cli #angular/core
After running this command, the lazy loaded routes will be automatically migrated to the new import syntax which is standard compliant and brings Angular close to the open web platform.
You also need to be aware of the following issues when upgrading your project:
Angular 8 makes use of the latest TypeScript 3.4, so even if the upgrade process completes with success you might have some syntax errors that may be due to the better type inference system used by the latest version which detects new potential typing issues but in the end this will improve your code quality and helps you avoid bugs in the future. You can see the new features of TypeScript 3.4 from the official docs.
You need to have Node.js 12+. Simply run node -v to verify your Node version. You can install the latest version from the official website

Node and cordova mismatch

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).

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

Resources