Error on installing angular/cli - not found: python2 - node.js

I am trying to install with this command "npm install -g #angular/cli".
But I always get the error "Error: not found: python2"
Is there something I am missing here?

Just in case you do not want to downgrade, which is not needed anyways.
Then this is what you should do,
Fix node-sass version issue first:
The issue is with the version of node-sass (prior to the python2 error). So install it as
npm install node-sass.
Now run npm install
If it asks to fix using npm audit fix. Go ahead!

Downgrade to npm version 4, try this:
npm install -g npm#4.6.1

I had the same issue. I manage to install the python 2 version. It got solved this is the version i installed
https://www.python.org/ftp/python/2.7.15/python-2.7.15.amd64.msi

Related

Installing Node.js latest version

I was having trouble in updating my npm. I updated my node from v6 to v10. And was wondering what version of npm is installed with the version of v10? or does it remain same ? because in my case it was still showing same old version of npm which is 3.3.12, could not able to update it to 6.5.0. there was some constant error coming which was really annoying every time. So i tried to uninstall node and install it again and again. But it is not working. for people to know i am using windows 7.
The error that i get when i try to update npm using command :
npm install --global --production npm-windows-upgrade
Error: Cannot find module 'internal/util/types'
and when i run : npm-windows-upgrade --npm-version latest ,
i get the error to reinstall node as there was error in installing npm upgrade. Please suggest me what to do
Update node version:
Use n module from npm in order to upgrade node
sudo npm cache clean -f sudo npm install -g n sudo n stable
To upgrade to latest version (and not current stable) version, you can use
sudo n latest
You will be found latest version for both npm and node
How about npm rebuild it? Hopefully, it would help you. If not working, reinstalling node and clearing npm cache could be fixed probably.

error when trying ''npm install node-sass --save dev"

PLEASE HELP!
Just a noob here, I am trying to work with some npm packages like sass, and I get this strange error mentioning LINUX OS, which was just tried to install on my computer.
How to fix this? Just to continue with my work, please.
Thanks in advance!
npm install node-sass --save-dev
Parameter --save-dev instead of --save dev ,You can run npm --help to see more details.
According to node-sass package docs there are prerequisites for windows:
https://www.npmjs.com/package/node-sass
You can find the node-gyp install details here:
https://github.com/nodejs/node-gyp#on-windows
If you are trying to install sass while your server is still running and getting this error, you can try restarting your server.
Try this
npm install -g node-sass

Cannot find module 'har-schema'

I am trying to make ionic2 app. But npm is not supporting. It always gives me this error.
Try to install previous version of npm:
npm install npm#5.2 -g
Unfortunatelly, current version(5.3) has a lot of bugs.
I found solution of it. Solution is uninstall node and npm completely from your PC and then re-install it.
to uninstall node and npm completely check this link.
How to completely remove node.js from Windows
This worked for me:
npm install -g --only=production --save har-schema

Npm install does not work

I have a problem with my npm. This is my error:
I try to uninstall nodejs and install it but my error stays, then I try the command npm install npm, Have the same error and npm -v does not work too.
Try to delete %APPDATA%\npm and reinstall node.
package semver is missing.
running npm install semver and try again

libsass bindings not found when using node-sass in nodejs

I want to use the node-sass module in my node.js v0.12 application to benefit from the performance of libsass.
I executed npm i node-sass to install the module, no errors so far.
Now the mess starts:
If I just open the REPL in a terminal to try out node-sass then everything works fine but if I include it in my project files and run node myfile.js then I get the following error message:
Error: `libsass` bindings not found. Try reinstalling `node-sass`?
The module's description at npmjs.com states that there might be a problem with resolving #!/usr/bin/env node under Ubuntu and how to fix this but that is not the case on my machine.
I could not find anything useful so I hope that you might help me.
I'm using node v0.12.2 under Ubuntu 14.10.
P.S.: I already tried to reinstall node-sass but without success. Nothing changes.
If you're using node 4.x or later then you need to reinstall gulp-sass with:
npm uninstall --save-dev gulp-sass
npm install --save-dev gulp-sass#2
You’ve probably tried to reinstall node-sass while using
npm install node-sass
or
npm uninstall node-sass
npm install node-sass
But node-sass is a C version of Sass. You have to use npm rebuild:
npm rebuild node-sass
I fixed this issue by deleting the existing /node_modules folder and running npm update
This is the only solution that worked for me,
sudo npm install -g n
sudo n 0.12.7
npm install node-sass#2
sudo npm -g install node-gyp#3
npm rebuild node-sass
This workaround (http://forum.ionicframework.com/t/error-running-gulp-sass/32311/20) worked form me.
Starting with this setup:
Cordova CLI: 5.3.3
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.0
Ionic Version: 1.1.0
Ionic CLI Version: 1.6.5
Ionic App Lib Version: 0.3.9
ios-deploy version: Not installed
ios-sim version: 5.0.1
OS: Mac OS X Yosemite
Node Version: v4.1.1
Xcode version: Xcode 6.4 Build version 6E35b
I've found a solution to avoid to use 'sudo' command. We need before to fix npm permissions following this: https://docs.npmjs.com/getting-started/fixing-npm-permissions and fixing permissions for Node here: http://mawaha.com/permission-fix-node-js/ After this we can check and reinstall software without 'sudo' for npm, n or ionic.
I followed this step:
npm install -g n
rm -R node_modules/
npm install node-sass#3.3.3
npm -g install node-gyp#3
npm uninstall gulp-sass
npm install gulp-sass#2
npm rebuild node-sass
ionic setup sass
Why node-sass#3.3.3? Because it works with latest ionic version: https://github.com/driftyco/ionic/pull/4449
Combining the two answers above worked for me, plus additions:
sudo npm uninstall --save gulp-sass
npm install --save gulp-sass#2
npm update
npm rebuild node-sass
I have solved this to create the right directory with the specified binding.node file. You can download the bindings from github
https://github.com/sass/node-sass-binaries
Look in the error message the path where it tries to find the binding. In my case:
C:\Users\Martijn\Documents\node_modules\gulp-sass\node_modules\node-sass\vendor\win32-x64-46
So I create this map win32-x64-46 and copy the binding from github in.
My solution was to downgrade to v0.10.25 (try sudo n 0.10.25 if you use n)
For me, this issue was caused in my build system (Travis CI) by doing something kind of dumb in my .travis.yml file. In effect, I was calling npm install before nvm use 0.12, and this was causing node-sass to be built for 0.10 instead of 0.12. My solution was simply moving nvm use out of the .travis.yml file’s before_script section to before the npm install command, which was in the before_install section.
This was a Node version issue for me, try using nvm to backtrack your version to something like: 0.10.32. This worked for me. I was running 4.2.2
I solved this problem by updating my gcc from 4.4.x to 4.7.x
No need for sudo or re-installations. This has always worked for me:
nvm use 0.12.2
This is the steps I undertook to fix my issue.
I updated my node manually to the latest version
Reinstalled node-sass
npm install node-sass
3.npm audit fix to fix certain vulnerabilities.
`npm audit fix`
5.npm install node-sass
`npm install node-sass`
worked and compiled properly thereafter.
I apologize if anything related to my answer isn't right. I'm just a beginner.
Hope it works for you

Resources