Local NPM/Atmosphere package repositories for Meteor applications without internet access -


i'm working on fork of meteor application rocket chat. have requirement stand application testing , development on isolated network, no internet access whatsoever.

i can't running on connected system , copy wholesale disconnected lab. rather, need able check out copy of source code (from local scm) , run meteor, letting perform necessary compilation , dependency resolution on fly.

even though huge kludge, hoping copy .meteor folder working system directly onto target system have cache of required packages , therefore not need reach out repositories. however, have found, works meteor dependencies downloaded atmosphere.

within rocket chat, there several private packages (such rocketchat-ldap) have dependencies on npm packages (in case, ldapjs). when application run , these packages built, .npm folder in user's home directory gets populated npm packages. so, tried package folder along .meteor folder accomplish same task.

unfortunately, when tested on offline system, despite having populated .npm folder, meteor spits out following error:

while building package rocketchat:ldap: error: can't install npm dependencies. connected internet?

obviously, i'm not connected - design.

so, looking sinopia stand npm repository mirror on our local network can host these dependencies. however, have no idea how i'm supposed point meteor alternate server. meteor documentation includes information npm.depends , npm.requires directives, application uses, can't find specifying url find said packages.

further, possible similar atmosphere packages? or copying .meteor folder way? in, there application out there can use host of meteor packages? or going in wrong way?

the solution went with, isn't elegant i'd hoped following:

first, copied .meteor folder user account of "working" system (this contains meteor executable , of meteor packages downloaded atmosphere) user account of disconnected target system. allowed target system run meteor.

second, npm packages in question being downloaded directly private packages in source, .gitignore file on source set ignore node_modules folders. altered , checked node_modules folders source rest of application.

so, example, application source included /packages/rocketchat-ldap/.npm/package folder. then, when application run using meteor, associated npm packages (such ldapjs) downloaded directly node_modules folder in folder structure, @ point private packages built.

now, source code in git contains downloaded packages, when copy checked out onto disconnected target system, there no need download them.

fortunately, did not increase size of source (just few hundred kilobytes).

the result when running meteor run application on target system, dependencies in place, , no internet connection required.


Comments