cdnjs-importer icon indicating copy to clipboard operation
cdnjs-importer copied to clipboard

TypeError: Cannot read property 'replace' of undefined

Open kemayo opened this issue 8 years ago • 5 comments

Looking at this, I suppose it's that the file map isn't being built (for whatever reason).

dlynch@wmf1453:~/wikimedia$ cdnjs-importer -g https://gerrit.wikimedia.org/r/p/oojs/core -p ~/src/cdnjs
info  Pulling from origin.
info  Cloning https://gerrit.wikimedia.org/r/p/oojs/core into /var/folders/28/9vnnrdl97hx9zt4z9n15nxgc0000gp/T/tmp-804249v5twSnysk6U
info  Set the source path: /dist
info  Creating the version directory: /Users/dlynch/src/cdnjs/ajax/libs/oojs/1.1.10
info  Getting the library files.
/usr/local/lib/node_modules/cdnjs-importer/lib/index.js:211
                package.filename = files[0].replace(pwd, "");
                                           ^

TypeError: Cannot read property 'replace' of undefined
    at /usr/local/lib/node_modules/cdnjs-importer/lib/index.js:211:44

kemayo avatar Oct 25 '16 17:10 kemayo

@IonicaBizau are you free to take a look?

PeterDaveHello avatar Oct 25 '16 18:10 PeterDaveHello

This importer will have to be refactored from scratch due to the latest changes.

On Tue, Oct 25, 2016 at 9:10 PM, Peter Dave Hello [email protected] wrote:

@IonicaBizau https://github.com/IonicaBizau are you free to take a look?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cdnjs/cdnjs-importer/issues/31#issuecomment-256114524, or mute the thread https://github.com/notifications/unsubscribe-auth/ACu085b6_doAQB3oji7Zac1tuk-DMEW9ks5q3kYEgaJpZM4KgPF- .

IonicaBizau avatar Oct 25 '16 18:10 IonicaBizau

@IonicaBizau do you mean 27cc194b29d641669f31f4186098083edb685e57 by @pvnr0082t ? If that'll be a problem, maybe we could just revert in the meantime.

PeterDaveHello avatar Nov 15 '16 15:11 PeterDaveHello

Hmm, I'm not sure, this should be anyways rewritten almost from scratch.

IonicaBizau avatar Nov 15 '16 17:11 IonicaBizau

Wow ... it'll be a huge work, I wonder if we could have a working version right now and then rewrite one, what do you think?

PeterDaveHello avatar Nov 15 '16 18:11 PeterDaveHello