devonfw / asciidoc-link-checker

Tool to check links in AsciiDoc files
Apache License 2.0
5 stars 10 forks source link

Error: Cannot find module '../build/index' #7

Closed gaurav-nelson closed 7 years ago

gaurav-nelson commented 7 years ago

I am getting following error in the latest version.

linkchecker Documents/openshift-docs/install_config/persistent_storage/
module.js:491
    throw err;
    ^

Error: Cannot find module '../build/index'
    at Function.Module._resolveFilename (module.js:489:15)
    at Function.Module._load (module.js:439:25)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/gnelson/.nvm/versions/node/v8.4.0/lib/node_modules/@oasp/asciidoc-link-checker/bin/linkchecker:5:20)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)

Version: ├── @oasp/asciidoc-link-checker@1.2.1 (github:oasp/asciidoc-link-checker#ac64831a376cd642f27ed09d334a1ad4e6a16708) Node: v8.4.0 NPM: 5.4.1

sjimenez77 commented 7 years ago

Hi @gaurav-nelson, sorry for the delayed response.

After last update, the /build folder, as it is auto generated when you compile the code with npm run build or yarn build was removed from the repository.

If you install the tool globally with npm i -g @oasp/asciidoc-link-checker you will find the /build directory in your global node_modules/@oasp/asciidoc-link-checker folder as it is uploaded in the npm registry.

If you still have this issue after reinstalling, please send us the details. Thanks!

UPDATE: I have just run the tool in the same directory from your OpenShift repository with the following result:

captura de pantalla 2017-09-22 a las 20 11 09

gaurav-nelson commented 7 years ago

@sjimenez77 Thank you for the update. Installing with npm i -g @oasp/asciidoc-link-checker fixed the issue.