softlayer / ember-cli-jsdoc

An Ember CLI addon to generate HTML documentation from JSDoc comments in the source code.
MIT License
21 stars 18 forks source link

"npm install" doesn't work for ember-cli-jsdoc #19

Closed ewoody closed 7 years ago

ewoody commented 8 years ago

Reproduce path -

  1. ember install ember-cli-jsdoc
  2. delete node_modules
  3. npm install

Expected Since after step 1, "ember-cli-jsdoc": "1.3.1", is added in package.json, I expected the "npm install" should install ember-cli-jsdoc addon in a clean directory. It is normal for other ember addons, and it is useful for continuous integration build server.

Problem after npm install on step 3, jsdoc is not installed correctly.

SpikedKira commented 8 years ago

I think step 1 should be npm install ember-cli-jsdoc --save-dev

notmessenger commented 8 years ago

@SpikedKira That way does not invoke the Ember CLI ecosystem, which you need for the installation of this addon, as it will then leverage the blueprint, so ember install ember-cli-jsdoc is correct.

@ewoody When you say that jsdoc is not installed correctly what are you seeing? Can you provide more details? I just started seeing something weird the other day in a CircleCI environment and am curious of the characteristics you are seeing.

ewoody commented 8 years ago

node_modules\ember-cli-jsdoc\node_modules.bin folder doesn't have jsdoc and jsdoc.cmd at all.

ewoody commented 8 years ago

There is no problem of installation on my local PC, the problem is our CI server can't use "ember install" as a step to build project.

notmessenger commented 8 years ago

CAUSE

FIX

notmessenger commented 8 years ago

@ewoody unrelated to what is the root cause of this issue, I'm curious about your comment in https://github.com/softlayer/ember-cli-jsdoc/issues/19#issuecomment-195263543 regarding your CI server not being able to use ember install. Are you installing ember addons as part of your build process in your CI environment or was that only in an attempt to diagnose this issue? Because if it is the former this is an unusual configuration, at least from my experience.

notmessenger commented 8 years ago

https://github.com/softlayer/ember-cli-jsdoc/releases/tag/v1.3.2 has been released to address this issue.

ewoody commented 8 years ago

binary files have not been copied in right location by npm install. that is -

the files in PROJECT_FOLDER\node_modules\ember-cli-jsdoc\node_modules.bin

should be copied to

PROJECT_FOLDER\node_modules.bin

so that our CI server doesn't work still.

notmessenger commented 8 years ago

@ewoody Which version of Node are you using on your CI server? Have you re-ran the build with no cache to ensure you are getting the latest version of this addon?

ewoody commented 8 years ago

I have verified that the v1.3.2 works for me after I deleted entire PROJECT_FOLDER\node_modules and re-run npm install.

Thank you for this fix.

mrryanjohnston commented 8 years ago

This issue still exists with v1.4.0.

Steps to reproduce:

  1. Create a new ember project ember new foobar
  2. cd foobar
  3. ember install ember-cli-jsdoc
  4. ember ember-cli-jsdoc
$ ember ember-cli-jsdoc
/bin/sh: node_modules/.bin/jsdoc: No such file or directory

EMBER-CLI-JSDOC: ERRORs have occurred during documentation generation

I can confirm that https://github.com/softlayer/ember-cli-jsdoc/issues/19#issuecomment-199825535 does resolve the issue.

notmessenger commented 8 years ago

I have been able to recreate the scenario outlined in https://github.com/softlayer/ember-cli-jsdoc/issues/19#issuecomment-249320765 including how to resolve it.

If when following the same steps instead of running Step 3: ember install ember-cli-jsdoc I run these two commands instead:

then the problem no longer occurs.

@mrryanjohnston I am going to reopen this issue and spend some time researching a few more items, which may possibly result in opening an issue with Ember CLI (depending on what some of my current thoughts to research turn up). I will update this issue with appropriate links and information as they occur. Thank you for reporting this behavior.

notmessenger commented 8 years ago

Have found this that is sort of related behavior - http://stackoverflow.duapp.com/questions/37142438/npm-node-modules-bin-symlinks

notmessenger commented 7 years ago

Believe this is resolved by https://github.com/softlayer/ember-cli-jsdoc/releases/tag/v1.4.1