How to make a permanent library modification (typ_ldapjs)


i had an issue with a library, which i solved myself by modifying one line inside

so from my project directory, the modified library is here


i just replaced the line 108 like that
before => var closeSocket = ( ? socket.socket : socket);
after => var closeSocket = socket;

i have explained why here

now my question is : can i make that customisation inside my project, to have no risk to loose it, rather than in …/.meteor/ which seems a bit tricky ?


Clone the GitHub repo into your packages/ folder and make the changes in there. Packages in packages/ take precedence over remote packages.


thanks for your reply

but i have difficulties to know from where to get that package :

the code i have modified by hard way is in ~/.meteor/packages/typ_ldapjs/.0.7.3…web.cordova/npm/node_modules/ldapjs/lib/client/client.js

but meteor list show only :
typ:accounts-ldap 1.0.1 Accounts login for LDAP using ldapjs…
(and meteor npm list show no ldap lib)

also several packages i found in github are not what i need to modify :scream:

(i need to modify the “var closeSocket” which i can find only in a comment this is exactly what i need to do :exploding_head:)

is there a way i can copy the subdirectory from my ~/.meteor/ ?

if yes, which level of the subdirectory should i copy ? (i tried various but that do not override as intended)

You clone the GitHub repo you raised the issue against:

cd <your-app-folder>
mkdir packages
git clone packages/meteor-accounts-ldap

The package in now in packages/meteor-accounts-ldap. You edit it in there.

thanks i tried but… that package do not contain what i need to modify :sob:

( plus i had a message in terminal “typ:accounts-ldap upgraded from 1.0.1 to 1.1.0” and a test made the app crash with “SizeLimitExceededError: Size Limit Exceeded at messageCallback (~/.meteor/packages/typ_ldapjs/.0.7.3…” )

From what you’re saying, it sounds like you want to get access to the version of the package you have installed.

Unfortunately, the package you’re looking at does not have any releases, nor are there any branches which might correspond to earlier releases. That means you’ll need to identify the commit which corresponds to the release you’ve got.

You can inspect the commits from this link. Clicking on a commit id (for example adfb5ee) will take you to a screen where you can “Browse Files”. Hopefully, you’ll be able to identify your version with a little investigating.

Once you’ve identified the commit id you need, go back to your packages/ folder and cd into the package you cloned. From there you can checkout the commit you need and work from there.

thanks for your reply

im now rather trying to start over on a clean new meteor (1.7) --bare project

now i succeed to reinstall my sources on a meteor new bare project, and on a too

both are using ~/.meteor/packages/typ_ldapjs/.0.7.3/…

i do not understand why in that folder the files structure do not looks like etyp/meteor-accounts-ldap at all, that looks like joyent/node-ldapjs which seems to be an unrelated package :astonished:

however i did meteor add typ:accounts-ldap then why i end up with that ~/.meteor/packages/typ_ldapjs/.0.7.3/npm/node_modules/ldapjs/lib/client/client.js which is seemingly an old commit of :worried:

i still would love if there is a way to copy a subfolder from my own ~/.meteor/packages/… to my ~/project/packages/ so i can make my modification permanent without more investigation :question:

( to summarize my modification is exactly that one comment “just assigning closeSocket to socket” )