-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npm issue while installing green bean #3
Comments
It looks like npm is getting something other than a JSON response when attempting to reach the Node package registry (https://www.npmjs.org/). You mention network/proxies. Are you by chance on a network that restricts outbound traffic and requires a proxy to reach external websites? If so, have a look at how to configure npm to work with your proxy settings. |
Yes I am on a network that is restricting outbound traffic and also use an automatic configuration script. Any ideas on how npm should be configured exactly in order to work with proxies? |
A quick Google searched turned up these: Since it sounds like you are using a PAC file, you will need to download it, see what it is doing and apply the appropriate settings to npm. |
@rudybrian: The same error persists. Anything in particular to follow when applying proxy settings to npm config file? |
@AlishaVarkey, you probably want to dig into the PAC file a bit more to see what it is doing and learn a little more about how the proxy in your environment works. You likely require authentication which will require adding "username:password"@ (with your username and password) at the beginning of your proxy URL such as http://"username:password"@proxy.company.com:8080 Also, be sure to do a npm config set https-proxy as well as a npm config set proxy to ensure both HTTP and HTTPS requests via npm will use the proxy server. To test out your proxy settings, you might want to grab a copy of wget for Windows, and follow the instructions to set the http_proxy and https_proxy environment variables and then enable proxy with --proxy=on when you run wget. See here for more details. Since wget has better debugging than npm for this sort of thing, it should be easier to figure out what is going on. Once you get this working, you can be more confident in what you use with npm. |
C:\Windows\system32>npm install green-bean
npm ERR! registry error parsing json
npm ERR! SyntaxError: Unexpected token <
npm ERR!
Apache Tomcat/5.5.28 - Error report<!
--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;f
ont-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-c
olor:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:whit
e;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-
serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-seri
f;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;
background:white;color:black;font-size:12px;}A {color : black;}A.name {color : b
lack;}HR {color : #525D76;}-->
HTTP Status 404 - /green
-bean
type Status report
m
essage /green-bean
description The requested resource
(/green-bean) is not available.
Apach
e Tomcat/5.5.28
npm ERR! at Object.parse (native)
npm ERR! at RegClient. (C:\Program Files\nodejs\node_modules\npm
node_modules\npm-registry-client\lib\request.js:274:23)
npm ERR! at Request._callback (C:\Program Files\nodejs\node_modules\npm\node
_modules\npm-registry-client\lib\request.js:246:65)
npm ERR! at Request.self.callback (C:\Program Files\nodejs\node_modules\npm
node_modules\request\request.js:236:22)
npm ERR! at Request.emit (events.js:98:17)
npm ERR! at Request. (C:\Program Files\nodejs\node_modules\npm\no
de_modules\request\request.js:1142:14)
npm ERR! at Request.emit (events.js:117:20)
npm ERR! at IncomingMessage. (C:\Program Files\nodejs\node_module
s\npm\node_modules\request\request.js:1096:12)
npm ERR! at IncomingMessage.emit (events.js:117:20)
npm ERR! at _stream_readable.js:943:16
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nod
ejs\node_modules\npm\bin\npm-cli.js" "install" "green-bean"
npm ERR! cwd C:\Windows\system32
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! type unexpected_token
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Windows\system32\npm-debug.log
npm ERR! not ok code 0
Is this an issue related to network/proxies etc?
P.S: I am using Windows 7 (64bit) & using npm version 1.4.28
The text was updated successfully, but these errors were encountered: