rvalitov / backlink-checker-php

Validates a predefined list of backlinks on remote websites that they exist and are correct (for SEO). Simple and Javascript-enabled web engines are used for scraping.
GNU General Public License v3.0
52 stars 19 forks source link

Error: Cannot find module 'lodash' #1

Closed aman9103 closed 4 years ago

aman9103 commented 5 years ago

C:\xampp\htdocs\backlink>php cli_test.php -u https://classess.page.tl/ -p @^https://(www\.)?dubaidance\.com.*@ Using mode: javascript The command "node "C:\xampp\htdocs\backlink\vendor\nesk\rialto\src/node-process/serve.js" C:\xampp\htdocs\backlink\vendor\nesk\puphpeteer\src\PuppeteerConnectionDelegate.js "{""idle_timeout"":60,""log_node_console"":false,""log_browser_console"":false}"" failed.

Exit Code: 1(General error)

Working directory: C:\xampp\htdocs\backlink

Output:

Error Output:

internal/modules/cjs/loader.js:638 throw err; ^

Error: Cannot find module 'lodash' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object. (C:\xampp\htdocs\backlink\vendor\nesk\rialto\src\node-process\NodeInterceptors\StandardStreamsInterceptor.js:3:11) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3)

rvalitov commented 5 years ago

Hello! So your question is about the demo right?

Did you install all the dependencies using command php composer install?

aman9103 commented 5 years ago

yes I have followed all the instruction of "How to Install". I have installed composer, node js, Install npm and but still getting same issue..

internal/modules/cjs/loader.js:638 throw err; ^

Error: Cannot find module 'lodash' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Module.require (internal/modules/cjs/loader.js:692:17) at require (internal/modules/cjs/helpers.js:25:18) at Object. (C:\xampp\htdocs\backlink\vendor\nesk\rialto\src\node-process\NodeInterceptors\StandardStreamsInterceptor.js:3:11) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3)

rvalitov commented 5 years ago

The section "how to install" describes only the minimal installation process. You also need to install dependencies, because you want to run the demo example. Please, let me know if you installed all the dependencies using command php composer install?

aman9103 commented 5 years ago

yes I have Installed ... i have tried to run script after installing dependencies under my root folder and also tried with under rvalitov folder.

rvalitov commented 5 years ago

Run the command npm list in the root folder of the demo. You should the following result:

f:\git\backlink-checker-php-demo
`-- @nesk/puphpeteer@1.6.0
  +-- @nesk/rialto@1.3.0
  | `-- lodash@4.17.15
  `-- puppeteer@1.18.1
    +-- debug@4.1.1
    | `-- ms@2.1.2
    +-- extract-zip@1.6.7
    | +-- concat-stream@1.6.2
    | | +-- buffer-from@1.1.1
    | | +-- inherits@2.0.4
    | | +-- readable-stream@2.3.6
    | | | +-- core-util-is@1.0.2
    | | | +-- inherits@2.0.4 deduped
    | | | +-- isarray@1.0.0
    | | | +-- process-nextick-args@2.0.1
    | | | +-- safe-buffer@5.1.2
    | | | +-- string_decoder@1.1.1
    | | | | `-- safe-buffer@5.1.2 deduped
    | | | `-- util-deprecate@1.0.2
    | | `-- typedarray@0.0.6
    | +-- debug@2.6.9
    | | `-- ms@2.0.0
    | +-- mkdirp@0.5.1
    | | `-- minimist@0.0.8
    | `-- yauzl@2.4.1
    |   `-- fd-slicer@1.0.1
    |     `-- pend@1.2.0
    +-- https-proxy-agent@2.2.2
    | +-- agent-base@4.3.0
    | | `-- es6-promisify@5.0.0
    | |   `-- es6-promise@4.2.8
    | `-- debug@3.2.6
    |   `-- ms@2.1.2 deduped
    +-- mime@2.4.4
    +-- progress@2.0.3
    +-- proxy-from-env@1.0.0
    +-- rimraf@2.7.0
    | `-- glob@7.1.4
    |   +-- fs.realpath@1.0.0
    |   +-- inflight@1.0.6
    |   | +-- once@1.4.0 deduped
    |   | `-- wrappy@1.0.2
    |   +-- inherits@2.0.4 deduped
    |   +-- minimatch@3.0.4
    |   | `-- brace-expansion@1.1.11
    |   |   +-- balanced-match@1.0.0
    |   |   `-- concat-map@0.0.1
    |   +-- once@1.4.0
    |   | `-- wrappy@1.0.2 deduped
    |   `-- path-is-absolute@1.0.1
    `-- ws@6.2.1
      `-- async-limiter@1.0.1

As you can see, the lodash module is correctly referenced here. Hence, it means that it was not installed by you. What is the output from npm install?

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.