Wappalyzer: Puppeteer not listed as dependency

Created on 3 Jan 2020  路  1Comment  路  Source: AliasIO/wappalyzer

Platform
Which platform does the bug apply to?

NPM

Describe the bug

When trying to select puppeteer as the browser option you get the following errors:

Error: Cannot find module 'puppeteer'
Require stack:
- /usr/lib/node_modules/wappalyzer/browsers/puppeteer.js
- /usr/lib/node_modules/wappalyzer/cli.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
    at Function.Module._load (internal/modules/cjs/loader.js:690:27)
    at Module.require (internal/modules/cjs/loader.js:852:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/usr/lib/node_modules/wappalyzer/browsers/puppeteer.js:1:19)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Module.require (internal/modules/cjs/loader.js:852:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/usr/lib/node_modules/wappalyzer/browsers/puppeteer.js',
    '/usr/lib/node_modules/wappalyzer/cli.js'
  ]
}

Note:

The example above was of me trying the package from the command line, but this issue also happens when you try to use the package in a Node.js project as well.

To Reproduce
Steps to reproduce the behavior:

  1. Run npm i wappalyzer -g
  2. Run wappalyzer www.google.com --browser=puppeteer

Expected behavior

For the wappalyzer package to crawl www.google.com using the puppeteer headless browser.

Additional context

I have attempted to trouble shoot the issue by doing the following:

  1. Removing the node_modules folder in my project (rm -rf node_modules/)
  2. Clearing my npm cache (npm cache clear --force)
  3. Reinstalling the packages for my project (npm i)

As well as

  1. Removing the wappalyzer package from my project (npm uninstall wappalyzer)
  2. Clearing my npm cache (npm cache clear --force)
  3. Reinstalling the package (npm i wappalyzer)

After looking at the package.json that was downloaded in the npm package, it looks like puppeteer isn't listed as a dependency but as a peerDependency.

"dependencies": {
    "zombie": "^6.1.2"
  },
  "peerDependencies": {
    "puppeteer": "^2.0.0"
  },
Bug

Most helpful comment

The puppeteer + chromium dependency is very large, which is why it's listed as a peer dependency for now. You'll have to manually install it with npm i puppeteer in order to use it.

$ npm i
npm WARN [email protected] requires a peer of puppeteer@^2.0.0 but none is installed. You must install peer dependencies yourself.

I'll add a note to the README.

>All comments

The puppeteer + chromium dependency is very large, which is why it's listed as a peer dependency for now. You'll have to manually install it with npm i puppeteer in order to use it.

$ npm i
npm WARN [email protected] requires a peer of puppeteer@^2.0.0 but none is installed. You must install peer dependencies yourself.

I'll add a note to the README.

Was this page helpful?
0 / 5 - 0 ratings