Skip to content

cache isn't working via npm install behind proxy #30

@Hotell

Description

@Hotell

Hi, I'm trying to setup npm_lazy on corporate server ( runs on centOS ) but without any luck.
I've configured the proxy settings in config file.

When I run npm_lazy:

[root@ITAP11 ~] npm_lazy -c ./npm_lazy.config.js
app info npm_lazy at 0.0.0.0 port 9000
app info npm_lazy cache directory: /root/.npm_lazy
app info Using http://171.27.1.254:3128 to proxy http requests.
app info Using https://171.27.1.254:3128 to proxy https requests.

now when i run npm install --registry http://localhost:9000 lodash
this is what I get:

npm http 502 http://localhost:9000/lodash
npm ERR! registry error parsing json
npm ERR! SyntaxError: Unexpected token <
npm ERR! <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
npm ERR! <html><head>
npm ERR! <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
npm ERR! <title>ERROR: The requested URL could not be retrieved</title>
npm ERR! <style type="text/css"><!--
npm ERR!  /*
npm ERR!  Stylesheet for Squid Error pages
npm ERR!  Adapted from design by Free CSS Templates
npm ERR!  http://www.freecsstemplates.org
npm ERR!  Released for free under a Creative Commons Attribution 2.5 License
npm ERR! */
...
...
npm ERR! System Linux 2.6.32-431.5.1.el6.centos.plus.x86_64
npm ERR! command "node" "/usr/bin/npm" "i" "--registry" "http://localhost:9000/" "lodash"
npm ERR! cwd /root/tmp
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.6
npm ERR! type unexpected_token
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /root/tmp/npm-debug.log
npm ERR! not ok code 0

but when I run request via wget, it works and correctly saves package to ~/.npm_lazy/
wget http://localhost:9000/lodash

any ideas?

thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions