Installing node http-proxy - sockets

I am trying to install node http-proxy with the following:
npm install http-proxy
But I get this error:
npm ERR! Unsupported
npm ERR! Not compatible with your version of node/npm: http-proxy#0.5.7
npm ERR! Required: {"node":"= 0.4.7"}
npm ERR! Actual: {"npm":"1.0.6","node":"v0.5.0-pre"}
npm ERR!
npm ERR! System Linux 2.6.18-028stab070.14
npm ERR! command "node" "/usr/local/bin/npm" "install" "http-proxy"
It says that it is unsupported with my version of Node.js. But I have v0.5.0 installed which is above the necessary v0.4.7.
Is node http-proxy only compatible with v0.4.7? Any ideas?

I'd assume it's because the package.json for that module specifies a specific version of node ("engines": { "node": "= 0.4.7" }) as opposed to saying (>= 0.4.7). By contrast, the package.json for connect says "engines": { "node": ">= 0.4.1 < 0.5.0" }

Related

No matching version found for protractor#~5.4.0

I tried to follow the angular cli tutorial for creating an Angular app. However, it is throwing an error on protractor 5.4.0.
here is the error message:
npm ERR! code ETARGET
npm ERR! notarget No matching version found for protractor#~5.4.0
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'angulartest6'
npm ERR! notarget
The latest version of protractor is 5.4.0. I also tried to install manually but it is throwing this error:
npm ERR! notarget No matching version found for protractor#5.4.0
What is the workaround so that I don't get this error?
Could you try adding the following to your package.jsonfile:
"dependencies": {
"protractor": "5.4.0"
}

IONIC start error

Im trying to fix this issue from 5 hours now and i still can't fix it i'm to start ionic and serve it but i get this error all the time i did everything on the internet to fix but still nothing
Your system information:
Cordova CLI: 6.4.0
Ionic CLI Version: 2.1.7
Ionic App Lib Version: 2.1.4
ios-deploy version: Not installed
ios-sim version: Not installed
OS: macOS Sierra
Node Version: v6.9.1
Xcode version: Not installed
******************************************************
Dependency warning - for the CLI to run correctly,
it is highly recommended to install/upgrade the following:
Install ios-sim to deploy iOS applications.`npm install -g ios-sim` (may require sudo)
Install ios-deploy to deploy iOS applications to devices. `npm install -g ios-deploy` (may require sudo)
i tried all these commands :
sudo npm install ios-sim -g
sudo npm install -g ios-deploy --unsafe-perm=true
npm install -g ios-deploy --allow-root
my ERROR
npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "ios-sim"
npm ERR! node v6.9.1
npm ERR! npm v3.10.8
npm ERR! path /Users/heshamelmasry/.npm-packages/lib/node_modules/ios-sim
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/Users/heshamelmasry/.npm-packages/lib/node_modules/ios-sim'
npm ERR! at Error (native)
npm ERR! { Error: EACCES: permission denied, access '/Users/heshamelmasry/.npm-packages/lib/node_modules/ios-sim'
npm ERR! at Error (native)
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/Users/heshamelmasry/.npm-packages/lib/node_modules/ios-sim' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/heshamelmasry/Desktop/npm-debug.log

Can not create ionic 2 app

I am following the ionic installation guide, but when I want to create app it give me error.
The command I enter is:
ionic start cutePuppyPics --v2
The error it gives is:
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\Nodist\\v\\nodev7.0.0\\node.exe" "C:\\Program Files (x86)\\Nodist\\bin\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v7.0.0
npm ERR! npm v3.10.6
npm ERR! code ELIFECYCLE
npm ERR! node-sass#3.9.3 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#3.9.3 postinstall script 'node scripts/build.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-sass
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! E:\nodeProjects\ionic\cutePuppyPics\npm-debug.log
Error with start undefined
Error Initializing app: There was an error with the spawned command: npminstall
There was an error with the spawned command: npminstall
Caught exception:
undefined
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
Node v7.0.0 causes this problem. Instead of nodejs v7.0.0 use nodejs v6.9.1 or install LTS version of node from https://nodejs.org/en/download
You don't have to use --v2 when creating your project. Just type
ionic start cutePuppyPics blank
--v2 is not working with latest ionic. you can use
ionic start cutePuppyPics ionic-angular (for ionic 2.x)
ionic start cutePuppyPics ionic1 (ionic 1.x)

Error while trying to install Babel JSX precompiler

Hi am getting the following error while trying to precompile my JSX code. I have been using it but something happened and I am unable to install this
npm install babel-preset-es2015 babel-preset-react
It is showing this error message:
npm ERR! Linux 3.13.0-85-generic npm ERR! argv "/usr/bin/nodejs"
"/usr/bin/npm" "install" "babel-preset-es2015" "babel-preset-react"
npm ERR! node v4.4.5 npm ERR! npm v2.15.5 npm ERR! file
/home/name/.npm/babel-plugin-check-es2015-constants/6.8.0/package/package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json npm ERR! Unexpected token '\u0000' at
1:1374 npm ERR!
e#readme","_id":"is-finite#1.0.1","_from":"is-finite#>=1.0.0 <2.0.0"}
npm ERR!
^ npm ERR! File:
/home/name/.npm/babel-plugin-check-es2015-constants/6.8.0/package/package.json
npm ERR! Failed to parse package.json data. npm ERR! package.json must
be actual JSON, not just JavaScript. npm ERR! npm ERR! This is not a
bug in npm. npm ERR! Tell the package author to fix their package.json
file. JSON.parse
npm ERR! Please include the following file with any support request:
npm ERR! /var/www/html/js/npm-debug.log
How to fix this?
If you want to install globally on your computer those modules, add -g:
npm install -g babel-preset-es2015 babel-preset-react
Otherwise, it meand you want to install it locally. Make sure your have package.json in the root used to launch that command. Follow package rules. Here is an example. Your can try to validate your package.json on package-json-validator.com

"npm install googleapis" produces the following error

"npm install googleapis" produces the following error:
npm ERR! Error: No compatible version found: inherits#'^2.0.1'
npm ERR! Valid install targets:
npm ERR! ["1.0.0","2.0.0","2.0.1"]
npm ERR! at installTargetsError (C:\Program Files\nodejs\node_modules\npm\lib\cache.js:553:10)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\lib\cache.js:477:15
npm ERR! at saved (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\get.js:138:7)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:218:7
npm ERR! at Object.oncomplete (fs.js:297:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
I had the same problem (OS X 10.9.4). What turned out to be the problem was a dated node/npm installation, which I upped to the latest version from the node.js homepage. Not sure if node or npm is the culprit, but upgrading both fixed the problem you describe.