Wappalyzer: running Wappalyzer via Node on AWS Lambda

Created on 19 Jan 2017  Â·  14Comments  Â·  Source: AliasIO/wappalyzer

If this is the wrong place for this please let me know and I will move it to the appropriate channels. I could not find an alternative location for support/chat.

I am attempting to run wappalyzer on AWS Lambda. I am also using cljs-lambda to write a small wrapper script and deploy to my aws account. The error I am receiving is:

Can't open 'driver.js'\n

My best guess is, it is in reference to this line here

I have also come across this blog post here. In short it says you need to set this line:

process.env[‘PATH’] = process.env[‘PATH’] + ‘:’ + process.env[‘LAMBDA_TASK_ROOT’]

However, when I set this in my script that runs:

const wappalyzer = require('wappalyzer');

wappalyzer.run(['https://wappalyzer.com', '--quiet'], function(stdout, stderr) {
    if ( stdout ) {
        process.stdout.write(stdout);
    }

    if ( stderr ) {
        process.stderr.write(stderr);
    }
});

It doesn't change anything. I have tried setting this in the actual index.js file but when I deploy to aws it is overwritten (by cljs-lambda,I think) when it readds the required modules.

I realize this issue is likely not Wappalyzer specific at all, looking for help from anyone who may have come across this before. Happy to move this discussion to a more appropriate location if there is one.

Most helpful comment

Someone else registered the name but was kind enough to hand it over. I gave up trying to figure out how to delete the old one.

All 14 comments

I'll need a bit more insight into your code before I can tell you exactly what's wrong, but I've deployed Wappalyzer to Lambda before (though without the cljs-lambda wrapper) and it's been painless. I just make sure to have everything in the proper locations. I didn't change the path the wappalyzer file expects the driver to be at so both of them are in the same folder.

I've used the following folder structure:

src
|-- wappalyzer.js
|-- driver.js
|-- apps.json
|-- index.js

All my calling code resides in index.js

I got the same issue (on macOS) here steps to reproduce:

1- install driver

→ npm install wappalyzer

2- copy this following code snippet into a new file named test.js

const wappalyzer = require('wappalyzer');

wappalyzer.run(['https://wappalyzer.com', '--quiet'], function(stdout, stderr) {
    if ( stdout ) {
        process.stdout.write(stdout);
    }

    if ( stderr ) {
        process.stderr.write(stderr);
    }
});

3 - node test.js

→ node test.js 
Can't open 'driver.js'

@james075 Are all three files (test.js, wappalyzer.js and driver.js) in the same folder?

Hey @ScionOfBytes, why is this important ? I'm using it as a module

const wappalyzer = require('wappalyzer')

@james075 This is Elbert's npm entry, by the way: npm install @wappalyzer/wappalyzer

Thx @ScionOfBytes I added the sample code in the same folder than (wappalyzer.js / driver.js) and it worked but can't use it as a module.

I have to take another look at this. But yea in my setup I am also using it as a module and it is being run from a 'node_modules' folder under my root app dir. Doing this, it currently won't work, like you say, and I describe in first post.

@james075 Have you tried using the package I linked you to instead of the other one? I've tried that package with the sample code provided and it seems to work fine.

@ScionOfBytes I can confirm I was able to use the one you referenced and it worked as expected.

On that note, there is also this package. What is the difference between these two packages? Why are there two?

@prees1 I'm not absolutely sure (will need @AliasIO to step in), but I think the other one is an older package. Anyway, if this issue is solved, you can close it.

You guys are the best :) I'm so glad I didn't have to spend a bunch of time troubleshooting this!

@wappalyzer/wappalyzer is old from main package, @AliasIO why there two packages? I can't use main package as module

Someone else registered the name but was kind enough to hand it over. I gave up trying to figure out how to delete the old one.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

timneutkens picture timneutkens  Â·  8Comments

patheticcockroach picture patheticcockroach  Â·  6Comments

oxr463 picture oxr463  Â·  6Comments

smokeyflavor picture smokeyflavor  Â·  8Comments

cfjedimaster picture cfjedimaster  Â·  5Comments