esdoc / esdoc-plugins

MIT License
139 stars 74 forks source link

ESDoc Standard Plugin should have the required other plugins as dependencies #8

Open MischkowskyM opened 7 years ago

MischkowskyM commented 7 years ago

I tried esdoc out today and had to manually install all these plugins, after installied esdoc-standard-plugin:

Since these are hard dependencies, they should be under the dependencies in the package.json.

rohan-deshpande commented 7 years ago

I'm just trying it out now, but I didn't need to install these, at least it didn't give me any warnings that they weren't installed.

jghinestrosa commented 7 years ago

Hi, I just had the same issue. I installed esdoc, esdoc-standard-plugin and configured the .esdoc.json file as the documentation says:

{
  "source": "./src",
  "destination": "./docs",
  "plugins": [
    {"name": "esdoc-standard-plugin"}
  ]
}

Then I execute esdoc. However, the plugins the esdoc-standard-pluginneeds are not found from esdoc, making node throw errors like these:

Error: Cannot find module 'esdoc-lint-plugin' Error: Cannot find module 'esdoc-coverage-plugin' Error: Cannot find module 'esdoc-accessor-plugin'

The error is thrown from the line 48, in node_modules/esdoc/out/src/PluginPlugin.js:

plugin = require(item.name);

esdoc and esdoc-standard-plugin are two different packages so, the esdoc-standard-plugin dependencies are not available from esdoc.

@rohan-deshpande Maybe you have those dependencies installed globally? Or maybe you have those dependencies installed locally in your project?

EDIT: I just realized I was trying to make this work with both packages installed globally... but these errors doesn't happen if the packages are installed locally and esdoc is executed using the path ./node_modules/.bin/esdoc.

I guess I'm missing something here, why doesn't it work with the packages installed globally?

TriMoon commented 6 years ago

I just had same issues using global install. So yea if they include all those sub modules into the esdoc-standard-plugin package then they better make them dependencies... It's kind of amaturistic if one needs to manually install the missing packages after those errors. PS: i installed missing package after missing package while tring to run esdoc for first time, because they don't showup combined but one after the other after you have installed the last broken dependency...

eg:

  1. run esdoc as per documentation example
  2. install missing package
  3. run esdoc
  4. goto (2) when error about missing package
SystemParadox commented 6 years ago

The plugins are listed as dependencies. The issue is with esdoc's module resolution and the way npm install global modules. See https://github.com/esdoc/esdoc/issues/494.