hegemonic / jsdoc-baseline

An experimental, extensible template for JSDoc.
Other
61 stars 32 forks source link

npm dependencies for jsdoc-baseline #177

Closed peter-lyons-kehl closed 7 years ago

peter-lyons-kehl commented 8 years ago

Hi Jeff,

Thank you for jsdoc-baseline.

However, I'm having a trouble installing it. I've followed README.md, experimented and researched. The problem is probably npm-specific, but it's outside my expertise. Any tips failed. I've tried to install on 3 various Linux distributions: Fedora 20 (yes, old), OpenSUSE 42.1 (the newest) and Ubuntu 16.04 (the newest). All with the latest master 12d1ca07a216404ac852e80b2f36dca6697155ef.

It seems that running the following improved it, but now I'm stuck: npm -g install --save-dev deep-extend js-beautify intl underscore-contrib npm -g install deep-extend js-beautify intl underscore-contrib

It caused js-beautify to be present twice, but the problem was present even before then.

Would you advise. Alternatively, do you have steps to install it in a vanilla installation of a major Linux distribution, please?

Following is in OpenSUSE:
npm --version
2.15.5

jsdoc --template ../jsdoc-baseline -r ../SeLite  -d .
....
module.js:327
    throw err;
    ^

Error: Cannot find module 'deep-extend'
    at Function.Module._resolveFilename (module.js:325:15)
    at Requizzle.requizzle (/usr/lib/node_modules/jsdoc/node_modules/requizzle/lib/requizzle.js:87:22)
    at infectProxy (/usr/lib/node_modules/jsdoc/node_modules/requizzle/lib/loader.js:82:28)
    at Module.targetModule.require (/usr/lib/node_modules/jsdoc/node_modules/requizzle/lib/loader.js:101:11)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/pkehl/jsdoc-baseline/lib/template.js:28:18)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Object.load (/usr/lib/node_modules/jsdoc/node_modules/requizzle/lib/loader.js:112:15)
    at Requizzle.requizzle (/usr/lib/node_modules/jsdoc/node_modules/requizzle/lib/requizzle.js:90:24)
    at infectProxy (/usr/lib/node_modules/jsdoc/node_modules/requizzle/lib/loader.js:82:28)
    at Module.targetModule.require (/usr/lib/node_modules/jsdoc/node_modules/requizzle/lib/loader.js:101:11)
    at require (internal/module.js:12:17)
    at FileFinder.require (/home/pkehl/jsdoc-baseline/lib/filefinder.js:197:12)
    at init (/home/pkehl/jsdoc-baseline/publish.js:32:32)

npm -g list
/usr/lib
├── deep-extend@0.4.1
├── intl@1.2.4
├─┬ js-beautify@1.6.3
│ ├─┬ config-chain@1.1.10
│ │ ├── ini@1.3.4
│ │ └── proto-list@1.2.4
│ ├─┬ mkdirp@0.5.1
│ │ └── minimist@0.0.8
│ └─┬ nopt@3.0.6
│   └── abbrev@1.0.9
├─┬ jsdoc@3.4.0
│ ├── async@1.4.2
│ ├── bluebird@2.9.34
│ ├─┬ catharsis@0.8.8
│ │ └─┬ underscore-contrib@0.3.0
│ │   └── underscore@1.6.0
│ ├── escape-string-regexp@1.0.5
│ ├── espree@2.2.5
│ ├── js2xmlparser@1.0.0
│ ├── marked@0.3.5
│ ├─┬ requizzle@0.2.1
│ │ └── underscore@1.6.0
│ ├── strip-json-comments@1.0.4
│ ├── taffydb@2.6.2
│ ├── underscore@1.8.3
│ └── wrench@1.5.9
├─┬ jsdoc-baseline@0.0.1-dev
│ ├── deep-extend@0.4.1
│ ├── escape-string-regexp@1.0.5
│ ├─┬ handlebars@4.0.5
│ │ ├── async@1.5.2
│ │ ├─┬ optimist@0.6.1
│ │ │ ├── minimist@0.0.10
│ │ │ └── wordwrap@0.0.3
│ │ ├─┬ source-map@0.4.4
│ │ │ └── amdefine@1.0.0
│ │ └─┬ uglify-js@2.6.2
│ │   ├── async@0.2.10
│ │   ├── source-map@0.5.6
│ │   ├── uglify-to-browserify@1.0.2
│ │   └─┬ yargs@3.10.0
│ │     ├── camelcase@1.2.1
│ │     ├─┬ cliui@2.1.0
│ │     │ ├─┬ center-align@0.1.3
│ │     │ │ ├─┬ align-text@0.1.4
│ │     │ │ │ ├─┬ kind-of@3.0.3
│ │     │ │ │ │ └── is-buffer@1.1.3
│ │     │ │ │ ├── longest@1.0.1
│ │     │ │ │ └── repeat-string@1.5.4
│ │     │ │ └── lazy-cache@1.0.4
│ │     │ ├─┬ right-align@0.1.3
│ │     │ │ └─┬ align-text@0.1.4
│ │     │ │   ├─┬ kind-of@3.0.3
│ │     │ │   │ └── is-buffer@1.1.3
│ │     │ │   ├── longest@1.0.1
│ │     │ │   └── repeat-string@1.5.4
│ │     │ └── wordwrap@0.0.2
│ │     ├── decamelize@1.2.0
│ │     └── window-size@0.1.0
│ ├── handlebars-layouts@3.1.3
│ ├── intl@1.0.1
│ ├─┬ intl-messageformat@1.2.0
│ │ └── intl-messageformat-parser@1.2.0
│ ├─┬ js-beautify@1.5.10
│ │ ├─┬ config-chain@1.1.10
│ │ │ ├── ini@1.3.4
│ │ │ └── proto-list@1.2.4
│ │ ├─┬ mkdirp@0.5.1
│ │ │ └── minimist@0.0.8
│ │ └─┬ nopt@3.0.6
│ │   └── abbrev@1.0.9
│ ├─┬ js-yaml@3.4.6
│ │ ├─┬ argparse@1.0.7
│ │ │ └── sprintf-js@1.0.3
│ │ ├── esprima@2.7.2
│ │ └── inherit@2.2.3
│ ├── spdx-license-list@2.1.0
│ └─┬ underscore-contrib@0.3.0
│   └── underscore@1.6.0
└─┬ underscore-contrib@0.3.0
  └── underscore@1.6.0
----------------------------------------

On Ubuntu (side note specific to Ubuntu: after vi /usr/local/bin/jsdoc to use 'nodejs' instead of 'node'):
npm --version
3.5.2

jsdoc --template ../jsdoc-baseline -r ../SeLite ../SelBlocksGlobal -d
....
module.js:328
    throw err;
    ^

Error: Cannot find module 'js-beautify'
    at Function.Module._resolveFilename (module.js:326:15)
    at Requizzle.requizzle (/usr/local/lib/node_modules/jsdoc/node_modules/requizzle/lib/requizzle.js:87:22)
    at infectProxy (/usr/local/lib/node_modules/jsdoc/node_modules/requizzle/lib/loader.js:82:28)
    at Module.targetModule.require (/usr/local/lib/node_modules/jsdoc/node_modules/requizzle/lib/loader.js:101:11)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/pkehl/jsdoc-baseline/lib/template.js:26:16)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Object.load (/usr/local/lib/node_modules/jsdoc/node_modules/requizzle/lib/loader.js:112:15)
    at Requizzle.requizzle (/usr/local/lib/node_modules/jsdoc/node_modules/requizzle/lib/requizzle.js:90:24)
    at infectProxy (/usr/local/lib/node_modules/jsdoc/node_modules/requizzle/lib/loader.js:82:28)
    at Module.targetModule.require (/usr/local/lib/node_modules/jsdoc/node_modules/requizzle/lib/loader.js:101:11)
    at require (internal/module.js:12:17)
    at FileFinder.require (/home/pkehl/jsdoc-baseline/lib/filefinder.js:197:12)
    at init (/home/pkehl/jsdoc-baseline/publish.js:32:32)

npm list -g
/usr/local/lib
├─┬ js-beautify@1.6.3
│ ├─┬ config-chain@1.1.10
│ │ ├── ini@1.3.4
│ │ └── proto-list@1.2.4
│ ├─┬ mkdirp@0.5.1
│ │ └── minimist@0.0.8
│ └─┬ nopt@3.0.6
│   └── abbrev@1.0.9
├─┬ jsdoc@3.4.0
│ ├── async@1.4.2
│ ├── bluebird@2.9.34
│ ├─┬ catharsis@0.8.8
│ │ └─┬ underscore-contrib@0.3.0
│ │   └── underscore@1.6.0
│ ├── escape-string-regexp@1.0.5
│ ├── espree@2.2.5
│ ├── js2xmlparser@1.0.0
│ ├── marked@0.3.5
│ ├─┬ requizzle@0.2.1
│ │ └── underscore@1.6.0
│ ├── strip-json-comments@1.0.4
│ ├── taffydb@2.6.2
│ ├── underscore@1.8.3
│ └── wrench@1.5.9
├─┬ jsdoc-baseline@0.0.1-dev
│ ├── deep-extend@0.4.1
│ ├── escape-string-regexp@1.0.5
│ ├─┬ handlebars@4.0.5
│ │ ├── async@1.5.2
│ │ ├─┬ optimist@0.6.1
│ │ │ ├── minimist@0.0.10
│ │ │ └── wordwrap@0.0.3
│ │ ├─┬ source-map@0.4.4
│ │ │ └── amdefine@1.0.0
│ │ └─┬ uglify-js@2.6.2
│ │   ├── async@0.2.10
│ │   ├── source-map@0.5.6
│ │   ├── uglify-to-browserify@1.0.2
│ │   └─┬ yargs@3.10.0
│ │     ├── camelcase@1.2.1
│ │     ├─┬ cliui@2.1.0
│ │     │ ├─┬ center-align@0.1.3
│ │     │ │ ├─┬ align-text@0.1.4
│ │     │ │ │ ├─┬ kind-of@3.0.3
│ │     │ │ │ │ └── is-buffer@1.1.3
│ │     │ │ │ ├── longest@1.0.1
│ │     │ │ │ └── repeat-string@1.5.4
│ │     │ │ └── lazy-cache@1.0.4
│ │     │ ├── right-align@0.1.3
│ │     │ └── wordwrap@0.0.2
│ │     ├── decamelize@1.2.0
│ │     └── window-size@0.1.0
│ ├── handlebars-layouts@3.1.3
│ ├── intl@1.0.1
│ ├─┬ intl-messageformat@1.2.0
│ │ └── intl-messageformat-parser@1.2.0
│ ├─┬ js-beautify@1.5.10
│ │ ├─┬ config-chain@1.1.10
│ │ │ ├── ini@1.3.4
│ │ │ └── proto-list@1.2.4
│ │ ├─┬ mkdirp@0.5.1
│ │ │ └── minimist@0.0.8
│ │ └─┬ nopt@3.0.6
│ │   └── abbrev@1.0.9
│ ├─┬ js-yaml@3.4.6
│ │ ├─┬ argparse@1.0.7
│ │ │ └── sprintf-js@1.0.3
│ │ ├── esprima@2.7.2
│ │ └── inherit@2.2.3
│ ├── spdx-license-list@2.1.0
│ └─┬ underscore-contrib@0.3.0
│   └── underscore@1.6.0
└── node@0.0.0
--------------------------------

On Fedora 20:
npm --version
3.9.6

jsdoc --template ../jsdoc-baseline -r ../selite ../sel-blocks-global -d .
....
module.js:340
    throw err;
          ^
Error: Cannot find module 'intl'
    at Function.Module._resolveFilename (module.js:338:15)
    at Requizzle.requizzle (/usr/lib/node_modules/jsdoc/node_modules/requizzle/lib/requizzle.js:87:22)
    at infectProxy (/usr/lib/node_modules/jsdoc/node_modules/requizzle/lib/loader.js:82:28)
    at Module.targetModule.require (/usr/lib/node_modules/jsdoc/node_modules/requizzle/lib/loader.js:101:11)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/pkehl/jsdoc-baseline/lib/template.js:20:19)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Object.load (/usr/lib/node_modules/jsdoc/node_modules/requizzle/lib/loader.js:112:15)
    at Requizzle.requizzle (/usr/lib/node_modules/jsdoc/node_modules/requizzle/lib/requizzle.js:90:24)
    at infectProxy (/usr/lib/node_modules/jsdoc/node_modules/requizzle/lib/loader.js:82:28)
    at Module.targetModule.require (/usr/lib/node_modules/jsdoc/node_modules/requizzle/lib/loader.js:101:11)
    at require (module.js:380:17)
    at FileFinder.require (/home/pkehl/jsdoc-baseline/lib/filefinder.js:197:12)
    at init (/home/pkehl/jsdoc-baseline/publish.js:32:32)

<many more NPM packages than on the previous two systems, no idea why it grew so long>
hegemonic commented 7 years ago

Sorry, but I'm not an NPM expert, and I have no idea why you're not able to install jsdoc-baseline normally. I'm not able to reproduce this issue, so I won't be able to help with debugging it. Again, my apologies.