Giter VIP home page Giter VIP logo

registry-static's Introduction

registry-static(1) -- a flat-file registry mirror tool

SYNOPSIS

registry-static -d my.registry.com -o /var/www/registry

DESCRIPTION

This module follows the skimdb from npm and creates a flat file copy of the registry on your local machine. This can then be served up behind nginx to give you a local, read-only mirror of the npm registry. It's not a private registry nor does it attempt to be one. It's designed to allow you to use the registry in-network to speed up your local development.

USAGE

This is the most common use, this will start following the registry and make copies of the modules and their tarballs into /var/www/registry. When it does, it will replace the tarball key in the package.json with the url provided with -d (so the downloads resolve locally).

This module also uses the sequence file, so you can kill it and it should restart from where it left off.

WARNING: This may take quite a while to complete and a large amount of disk space (more than 283GB at last check)

DIRECTORY STRUCTURE

When it pulls the package.json for a module, it will create a directory structure similar to this:

./davargs
|-- -
|   |-- davargs-0.0.1.tgz
|   +-- davargs-0.0.2.tgz
|-- 0.0.1
|   +-- index.json
|-- 0.0.2
|   +-- index.json
|-- index.json
+-- latest
    +-- index.json

This allows for the following url styles to work:

my.registry.com/davargs
my.registry.com/davargs/0.0.1
my.registry.com/davargs/0.0.2
my.registry.com/davargs/latest
my.registry.com/davargs/-/davargs-0.0.1.tgz
my.registry.com/davargs/-/davargs-0.0.2.tgz

NGINX CONFIGURATION

Since we are writing a bunch of index.json files, you need to setup nginx to front the filesytem to resolve things like:

myregistry.com/foo
                /index.json

Note also that we write 404.json and the top-level index.json to the '-' directory under the root, in order to not collide with packages that might have those names.

Here is the simple nginx.config that I use on my local mirror.

server {
    listen       80;
    server_name  localhost;
    charset utf-8;
    root   /Users/davglass/registry/;
    index  index.json;

    #cache the crap out of the tarballs
    location ~* ^.+\.(?:tgz)$ {
        expires 30d;
        tcp_nodelay off;
        open_file_cache max=3000 inactive=120s;
        open_file_cache_valid 45s;
        open_file_cache_min_uses 2;
        open_file_cache_errors off;
    }

    #don't cache the main index
    location /-/index.json {
        expires -1;
    }

    #cache all json by modified time
    location / {
        expires modified +15m;
        try_files $uri $uri/-/index.json $uri/index.json $uri.json =404;
    }

    error_page  404              /-/404.json;
}

The try_files here with $uri are to keep nginx from doing a 302 redirect without the trailing /

LOGIC

First, no files are ever deleted. The reference to the tarball may be removed from the local package.json but the tarball itself is not removed. This is to ensure that things like npm shrinkwrap continue to work.

Each download is verified against the shasum in the package.json. If the verification fails, the file is retried up to 4 times. If it fails all of those, it is skipped and not stored locally.

Each change request will process the entire module, not just the change alone. This is to make sure that tags and new versions are all in sync.

HOOKS

If you provide --hooks <path>, the module at path will be required. It is expected to export an object whose properties are hook functions. A hook function has the following signature:

function(data, callback){ /* ... */ }

data is a blob of data corresponding to the current state. Usually it's a set of useful metadata about the package currently being processed.

this.options is the result of yargs parsing the command-line options and/or config file. You can use this to refer to any existing options, or to introduce your own.

this.log is registry-static's instance of davlog.

Hook functions are called with the same context each time and for each hook. It's one context shared throughout the whole process. You can use this to share data between invocations or different hooks.

The callback's signature is:

function(error, shouldSave){ /* ... */ }

Where shouldSave is a boolean stating whether or not to actually perform the action that happens right after the hook (usually writing something to disk). In most cases, you'll want to call the callback with callback(null, true). To prevent the action from happening, you can do callback(null, false).

Note the data passed in is a reference, so modifications to it may have side effects. For example, modifying data.tarball in the tarball callback will change the location of the tarball.

Please don't throw any errors inside a hook function. If an error occurs, pass it along as a first parameter to the callback.

Here are the currently provided hooks:

  • beforeAll: Called before any data is written, at the beginning of processing a change. If the callback is called with an error or false, no more processing will be done for this change, and no files will be written.
  • afterAll: Called after all the data is written, at the end of processing a change. If there is no error, the callback parameters are ignored.
  • globalIndexJson: Called before writing an update to the top-level index.json.
  • indexJson: Called before writing a package's main index.json.
  • versionJson: Called before writing the index.json for a particular package version.
  • tarball: Called before downloading/verifying/writing a package tarball.
  • afterTarball: Called after downloading/verifying/writing a package tarball. If there is no error, the callback parameters are ignored.
  • startup: Called before doing anything else at start time.
  • shasumCheck: Called in order to check the sha1sum of a tarball. Calling back with true implies the shasum passed. Default is in lib/defaultShasumCheck.js.

Some examples are included in the examples directory.

BLOB-STORES

By default, registry-static uses fs-blob-store, meaning all the metadata and tarballs are stored on disk, wherever you've decided to with the --dir option. Alternatively, you can use a custom blob store, as long as it implements the abstract-blob-store spec. Just create a file that exports the blob store you want, and then pass that in to the --blobstore option.

LOGGING

Supports --log <path> to log all output to a specific file.

When doing this, you may want to rotate your logs. You can do this by sending the process a SIGPIPE signal. This will free up the file descriptor and then reattach it to the file.

If you are using logrotate.d, configure your process monitor to start registry-static like this:

registry-static -d my.registry.com -o /var/www/ --log /var/log/registry-static/output.log

and the logrotate config file (/etc/logrotate.d/registry-static):

/var/log/registry-static/*.log {
        daily
        missingok
        rotate 52
        compress
        delaycompress
        notifempty
        sharedscripts
        postrotate
                [ -f /tmp/registry-static.pid ] && kill -PIPE `cat /tmp/registry-static.pid`
        endscript
}

(This assumes that your process monitor stores the pid in /tmp/registry-static.pid.)

CAVEATS

Smart routes like /-/all or /-/short

These routes require processing of the files. You "could" technically do it with a cache and using the fs module to walk the tree and build those routes.

BUILD

Build Status

registry-static's People

Contributors

achingbrain avatar bengl avatar davglass avatar drewfish avatar fivetanley avatar krotscheck avatar mmalecki avatar s-yoshika avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

registry-static's Issues

option to not use child process

In some cases (like in managed environments, w/ monit, upstart, etc.) it might not be very useful to have a child process.

Package called index.json

This is an interesting problem. I guess we need to completely ignore this package? It doesn't look like anything usable anyway.

2015-12-18T10:31:03.071Z static [info] [223479/571128] processing index.json
2015-12-18T10:31:03.080Z static [info] [1] downloading http://registry.npmjs.org/index.json/-/index.json-1.0.0.tgz
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: ENOTDIR: not a directory, mkdir '/mnt/npm/data/index.json/-'
    at Error (native)

Configuration Driven

Currently the bin script is argument driven.

We need to make all arguments parseable from a JSON config

Any argument that is passed should supersede the config

Default config location:

var path = require('path');
var config = path.join(path.dirname(process.execPath), '../etc/registry-static/config.json');

Also support an argument: -c/--config /path/to/config.json

Maybe even support ENV vars? Not sure if that's useful in this use case.

scoped packages

Support for scoped packages is needed, as some popular non-scoped packages are starting to include scoped packages as dependencies. It's high-time to start treating scoped packages as first-class citizens, when we know about them.

But how do we know about them? The skimdb feed currently doesn't include scoped packages. On npm's IRC, @othiym23 suggested grabbing the dependencies on each change and adding any scoped packages to the queue for syncing. While this doesn't bring in brand new scoped packages, it does help prevent broken builds due to missing packages, so I think this is probably the way to go for now.

Opinions?

sha1sums are incorrect when attempting to use registry-static mirror

I'm attempting to set up an internal npm mirror for our organization. The initial mirroring appears to have completed successfully, with sha1sums matching:
static [info] [0] shasum check passed for /apostrophe-snippets/-/apostrophe-snippets-0.5.58.tgz (b0d51628fa393e6d004c851846928b0d578cf273)
static [info] [371861/371861] writing json for apostrophe-snippets to /var/lib/npm-registry-static/apostrophe-snippets/index.json
static [info] [371861/371861] done processing 170 versions of apostrophe-snippets in 0.344 seconds

however, when I attempt to use the server, it fails:
austin@aw25 ~ $ npm cache clear
austin@aw25 ~ $ npm install --registry=http://npm.example.org/ async
npm ERR! Error: shasum check failed for /tmp/npm-12587-JKDZJBAO/my.registry.com/async/-/async-0.9.0.tgz
npm ERR! Expected: ac3613b1da9bed1b47510bb4651b8931e47146c7
npm ERR! Actual: 3f0c334583114690c28bf65e865a7c12ead1e0c7
npm ERR! From: http://my.registry.com/async/-/async-0.9.0.tgz
npm ERR! at /usr/lib64/node_modules/npm/node_modules/sha/index.js:38:8
npm ERR! at ReadStream. (/usr/lib64/node_modules/npm/node_modules/sha/index.js:85:7)
npm ERR! at ReadStream.emit (events.js:117:20)
npm ERR! at _stream_readable.js:938:16
npm ERR! at process._tickCallback (node.js:419:13)
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 Linux 3.13.3-gentoo-devlight-1
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "--registry=http://npm.example.org/" "async"
npm ERR! cwd /home/austin
npm ERR! node -v v0.10.30
npm ERR! npm -v 1.4.21
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/austin/npm-debug.log
npm ERR! not ok code 0

I get the same problem with node 0.11.13 on the client. The server is running 0.10.30.

I also tried using node 0.10.31 on both server and client, but the problem persists. Note that the initial mirroring was done with 0.10.30 (I'm not sure if I need to redo that with a different node.js version).

It's notable that the actual tarball sha1sum changes each time. Looking at it, it's an html error page:
austin@aw25 ~ $ cat /tmp/npm-18997-WImw9AHT/my.registry.com/async/-/async-0.9.0.tgz

<title> REGISTRY.COM </title> <style type="text/css"> body{margin:0;padding:0;} img{border-style:none;} #container {background-color:#FFF;} </style>
Sorry! This site is not currently available.
<script type="text/javascript" src="http://ak2.imgaft.com/script/jquery-1.3.1.min.js"></script>
<img id="impspacer" alt="" height="1" width="1" />
<script type="text/javascript" language="javascript">
    var impspacer = document.getElementById('impspacer');
    if (impspacer) { impspacer.src = '/img.aspx?q=L3MkWGAkAmp3AQV1AmH3ZwZ5ZmLjBQpjAPHlAzpyZ3RmZGNyZwMyWGAkqzSzM255rFHlo25zoTSjWGV2ovHmpGNyZwMwWGAkZPHlAzIzWGAkZPHlAzLyZ3RyZwMyMlHmpGVjZGDjBQV2ZGV1ZwV0WGV2L3xyZ3RkWGV2qTpyZ3RyZwM4WGAkWGV2MzqjWGAkZPHlAz56WGAkZPHlAzMjWGAkZPHlAzuhMlHmpGRyZwMjpPHmpHuTWGV2L2tyZ3Rj-1'; }
</script>

index.json module causes error

There's a module named index.json that causes a directory to be created called index.json, which conflicts with the index.json file.

For my purposes I just manually incremented the sequence file to skip it, but I thought it was worth noting.

Allow downloading only X latest versions

The fact that it takes 117GB to download the entire registry is limiting.
It's very likely that you'd only need one of the latest X versions of each package.
Would be nice to be able to specify how many to download. It should cut down the download size significantly. Could fallback on the remote registry if a really old version is needed?

Allow default paths for logging

Now that we have a default location for a config, maybe we can also have a default location for the logs that works similar:

path.join(path.basename(process.execPath), '../log/registry-static/output.log');

Or something like that.

Rewriting the folder structure in a hook

Heya! I have a rather odd use case - we've got a multi-cloud environment, and each of our mirrors is actually an AFS slave in each cloud, with two masters with all the data on them. The upside of this is that we only have two enormous mirrors, and each slave only keeps those things in cache that are frequently used. Downside... well, AFS has a practical folder size limit of ~64K files.

To resolve this with pip, rpm, etc, we've rewritten the folder structure, and hidden it behind mod_rewrite. For example: /foo becomes /f/foo, /bar becomes /b/bar, /q becomes /q/q. I'm currently trying to build a set of registry-static hooks which automatically generate this structure, and I need a bit of advice and/or troubleshooting help.

Firstly, relocating the tarballs is quick and simple. Yay! I can't, unfortunately, figure out how to relocate the various index.json files. Digging into follow-registry and patch-package-json showed me that the folder name for the json output is derived from the package name. Modifying that permanently changes the name of the package in the mirror, so that's not an option.

My current thought, is that I can update registry-static to provide an additional parameter in the data that gets sent to the hooks (peer to tarballs), which includes the actual output directory, and permit modifications to persist. This would propagate to where the tarballs live, etc.

I'd like to know if that's an approach you'd be comfortable with, and/or whether there's a different way to approach this problem, and if not - where the best place to apply those changes would be.

Thanks in advance :)

Semver sanitization

So, we just ran into the following:

> npm install --verbose [email protected]

npm info it worked if it ends with ok
npm verb cli [ '/usr/local/Cellar/node4-lts/4.4.2/bin/node',
npm verb cli   '/usr/local/bin/npm',
npm verb cli   'install',
npm verb cli   '--verbose',
npm verb cli   '[email protected]' ]
npm info using [email protected]
npm info using [email protected]
npm verb request uri http://mirror.dfw.rax.openstack.org/npm/shelljs
npm verb request no auth needed
npm info attempt registry request try #1 at 9:26:53 AM
npm verb request id 33270f960f7e5277
npm verb etag "1685e-530d28b5dd0c0"
npm verb lastModified Tue, 19 Apr 2016 08:48:43 GMT
npm http request GET http://mirror.dfw.rax.openstack.org/npm/shelljs
npm http 304 http://mirror.dfw.rax.openstack.org/npm/shelljs
npm verb headers { date: 'Fri, 22 Apr 2016 16:26:53 GMT',
npm verb headers   server: 'Apache/2.4.7 (Ubuntu)',
npm verb headers   connection: 'Keep-Alive',
npm verb headers   'keep-alive': 'timeout=5, max=99',
npm verb headers   etag: '"1685e-530d28b5dd0c0"' }
npm verb etag http://mirror.dfw.rax.openstack.org/npm/shelljs from cache
npm verb get saving shelljs to /Users/krotscheck/.npm/mirror.dfw.rax.openstack.org/npm/shelljs/.cache.json
npm verb correctMkdir /Users/krotscheck/.npm correctMkdir not in flight; initializing
npm verb stack TypeError: Invalid Version: 0.0.1alpha1
npm verb stack     at new SemVer (/usr/local/lib/node_modules/npm/node_modules/semver/semver.js:293:11)
npm verb stack     at SemVer.compare (/usr/local/lib/node_modules/npm/node_modules/semver/semver.js:342:13)
npm verb stack     at compare (/usr/local/lib/node_modules/npm/node_modules/semver/semver.js:566:31)
npm verb stack     at rcompare (/usr/local/lib/node_modules/npm/node_modules/semver/semver.js:576:10)
npm verb stack     at Array.sort (native)
npm verb stack     at pickVersionFromRegistryDocument (/usr/local/lib/node_modules/npm/lib/fetch-package-metadata.js:121:48)
npm verb stack     at /usr/local/lib/node_modules/npm/node_modules/iferr/index.js:13:50
npm verb stack     at /usr/local/lib/node_modules/npm/lib/utils/pulse-till-done.js:19:8
npm verb stack     at saved (/usr/local/lib/node_modules/npm/lib/cache/caching-client.js:168:7)
npm verb stack     at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:210:7
npm verb cwd /Users/krotscheck/Desktop/openstack/horizon
npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/Cellar/node4-lts/4.4.2/bin/node" "/usr/local/bin/npm" "install" "--verbose" "[email protected]"
npm ERR! node v4.4.2
npm ERR! npm  v3.8.5

npm ERR! Invalid Version: 0.0.1alpha1
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>
npm verb exit [ 1, true ]

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/krotscheck/Desktop/openstack/horizon/npm-debug.log`

A bit of sleuthing lead me to npm/npm#9701, which suggests that some of the older packages will have versioning problems. Practically speaking they may not cause that many issues, since they're so old and the dependencies should have been updated, however it might be something worth fixing. I'm building a list of all impacted packages now.

Are tests passing?

Do all tests pass? I see two failing:

index
    ✓ should export and object with methods
    ✓ start method should call run, clean and defaults
    ✓ clean method should do nothing without config
    ✓ clean method with options should unlink file
    ✓ run method should execute
    ✓ run method with since should execute
[Error: Blob not found]
    1) updateIndex method should do its thing
    ✓ defaults method
[Error: Blob not found]
    2) change method
    ✓ change method when bad JSON is provided

I'm using Node.js v4.2.1

Cannot read property dependencies of undefined

I encountered a situation where after all of the checks here, ver.json, and therefore json, was undefined, causing an error here.

    data.versions.forEach(function(ver){
        if (ver && ver.json && ver.json.version === latestVersion) {
            json = ver.json;
        }
    });
    if (!json) {
        return callback();
    }
    [
        'dependencies',
        'devDependencies',
        'optionalDependencies'
    ].forEach(function(depType) {
        if (typeof json[depType] !== 'object') {

I resolved it by modifying index.js to:

    data.versions.forEach(function(ver){
        if (ver && ver.json && typeof ver.json === 'object' && ver.json.version === latestVersion) {
            json = ver.json;
        }
    });
    if (!json) {
        return callback();
    }
    [
        'dependencies',
        'devDependencies',
        'optionalDependencies'
    ].forEach(function(depType) {
        if (!json || typeof json !=== 'object' || typeof json[depType] !== 'object') {

But I'm not certain that's the most ideal way to go about resolving this, as I didn't have time to investigate the root cause.

Example Startup Scripts

Here is the script that I use on my mirror machines, maybe we can look into providing proper startup scripts and checks. Maybe use monit to monitor the process and restart it when needed?

#!/bin/bash

if [ "$SUDO_USER" = "" ]; then
    echo "You're not allowed to execute this script. Please run this with sudo.";
    exit 1;
fi

pid="/tmp/registry-static.pid"

if [ -f $pid ]; then
    PID=`cat $pid`
    echo "Found a running process: $PID. Killing it first.."
    kill $PID;
    rm $pid
fi

echo "Launching registry-static in the background..."
cd /tmp/
nohup /bin/registry-static &
echo "Launched"

TypeError: Cannot read property 'emit' of null

I'm getting this error on every run:

_http_client.js:277       
  req.emit('close');      
     ^                    

TypeError: Cannot read property 'emit' of null      
    at TLSSocket.socketCloseListener (_http_client.js:277:6)                                            
    at emitOne (events.js:101:20)                   
    at TLSSocket.emit (events.js:188:7)             
    at _handle.close (net.js:509:12)                
    at TCP.done [as _onclose] (_tls_wrap.js:332:7)  

Q: What is the complete purpose of the /-/index.json

The constant reading and writing of the /-/index.json file is creating some speed bottlenecks (or sometimes deadlocks) when adding modules to IPFS (because we get several threads trying to write to the same file in the go land), I was checking, and for npm to work, this file is not needed, but I'm not sure what was the full purpose of having this log, was it for internal monitoring tools to grab stats?

https://github.com/davglass/registry-static/blob/master/lib/index.js#L47-L84

//cc @bengl

SyntaxError: Unexpected token u when json.versions does not contain dist-tag

When addVersionAs in lib/registry.js is called it makes the assumption that the passed in version from dist-tags is in json.versions. However there are situations in which it might not be.

 38     function addVersionAs(name, version) {
 39         parts.push({
 40             version: name,
 41             json: JSON.parse(JSON.stringify(json.versions[version]))
 42         });
 43     }

A module that demonstrates this behavior is chokidar. The crash looks like this.

SyntaxError: Unexpected token u
    at Object.parse (native)
    at addVersionAs (/Users/adam_baldwin/.nvm/versions/node/v4.2.1/lib/node_modules/registry-static/node_modules/follow-registry/lib/registry.js:42:24)
    at /Users/adam_baldwin/.nvm/versions/node/v4.2.1/lib/node_modules/registry-static/node_modules/follow-registry/lib/registry.js:49:13
    at Array.forEach (native)
    at splitVersions (/Users/adam_baldwin/.nvm/versions/node/v4.2.1/lib/node_modules/registry-static/node_modules/follow-registry/lib/registry.js:47:40)
    at Object.split (/Users/adam_baldwin/.nvm/versions/node/v4.2.1/lib/node_modules/registry-static/node_modules/follow-registry/lib/registry.js:77:20)
    at /Users/adam_baldwin/.nvm/versions/node/v4.2.1/lib/node_modules/registry-static/node_modules/follow-registry/lib/index.js:23:29
    at Request._callback (/Users/adam_baldwin/.nvm/versions/node/v4.2.1/lib/node_modules/registry-static/node_modules/follow-registry/lib/registry.js:26:9)
    at Request.self.callback (/Users/adam_baldwin/.nvm/versions/node/v4.2.1/lib/node_modules/registry-static/node_modules/request/request.js:198:22)
    at emitTwo (events.js:87:13)

registry-static -v
2.0.0

node --version
v4.2.1

lib/sync.js enhancements

I was going to start the tests for this, but then I remembered that the sync script doesn't do everything that it should do.

The idea was that it scans the directory tree, grabs the latest index.json and then queries the registry to see if we have the latest version stored.

What it doesn't do that it should do:

  • sync any versions that are out of date
  • then verify all of the tarballs, pulling ones that are missing.

Use dnscache module

Since we are querying the registry dozens upon dozens of times, let's add in the dnscache module so that we cache the dns lookups.

Hooks

Hooks at various parts of the process would be helpful.

single-run mode

Following up #66 - the next thing I'd like to contribute is a single-run mode, i.e. a mode that brings the mirror up-to-date, and then exits with status 0. The reason is that our mirroring is actually a two-step process: Update the filesystem on a privileged host, and then pushing the changes to the AFS master disks (aka vos release). This latter part is way easier for us if we can guarantee that our filesystem is consistent, and will not change during the - perhaps slow - process of updating the master.

After digging a bit, it seems that the best place to start is by taking advantage of the wait() hook in the follow library. Surfacing this up through follow-registry, I can call process.exit() when it is triggered, assuming the appropriate commandline option (assuming --single-run) is passed.

Do you have any comments on this? Perhaps suggestions on how to approach it differently?

NPM HA support with Kappa, Nginx and Registry-Static

Hi guys,

After today's outage on NPM skimdb.npmjs.com unavailable http://status.npmjs.org/incidents/dh3p7jb3ljn5, our internal NPM registry failed to replicate and, as a consequence, all NPM commands failed. I'm thinking on the following strategy to support HA and resilience on the READS:

  • Kappa: Front of all requests
  • Internal NPM: First server that proxies all public libraries from skimdb
  • nginx + Registry Static: Serves from the same directory our Internal NPM registry is writing to.

Questions

  • Could I use this application to support my HA requirements?
  • Could you service use the file-system built by NPM? In order words, are the URL paths from the skimdb.npmjs.com the same to the URI path in the file-system that registry-static reads?
  • Is there support for @scope libraries

thanks a lot
Marcello

Random Errors in our logs

Here are some random errors in our local logs:

[Error: Hostname/IP doesn't match certificate's altnames]

SyntaxError: Unexpected token <
    at Object.parse (native)
    at Object.patchPath [as json] (/home/davglass/registry-static/node_modules/patch-package-json/patch.js:28:21)
    at Object.change [as handler] (/home/davglass/registry-static/lib/index.js:79:22)
    at /home/davglass/registry-static/node_modules/follow-registry/lib/index.js:20:24
    at Request._callback (/home/davglass/registry-static/node_modules/follow-registry/lib/registry.js:24:9)
    at Request.self.callback (/home/davglass/registry-static/node_modules/request/request.js:372:22)
    at Request.EventEmitter.emit (events.js:98:17)
    at Request.<anonymous> (/home/davglass/registry-static/node_modules/request/request.js:1317:14)
    at Request.EventEmitter.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (/home/davglass/registry-static/node_modules/request/request.js:1265:12)
{ [Error: getaddrinfo ENOTFOUND] code: 'ENOTFOUND', errno: 'ENOTFOUND', syscall: 'getaddrinfo' }

These are from our nohup log, so it's a bit hard to track. I think the first error and the last are from request and the registry. The other error is totally from my patch-package-json module.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.