kirakishin / gitlab-changelog-generator

Generate changelog based on Gitlab
MIT License
6 stars 1 forks source link

Error module #1

Open Gouigouix opened 6 years ago

Gouigouix commented 6 years ago

Hello,

When I execute the command I have this error:

module.js:471
    throw err;
    ^

Error: Cannot find module 'C:\ts\data\workspace\test\gitlab-changelog-generator'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.runMain (module.js:604:10)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3

My config:

Thank you.

kirakishin commented 6 years ago

Hello,

i think if we want to directly use gitlab-changelog-generator, we must put it into node_modules/gitlab-changelog-generator/.bin directory.

can you try this workaround : node node_modules/gitlab-changelog-generator [...] ?

thanks for the feedback

Gouigouix commented 6 years ago

@kirakishin

Yes I wanted to do a simple test before I could integrate it into my workflow. I tested by pointing to the bin of the plug-in, but now I have the following error:

[gitlab-changelog-generator] generator initialized
[gitlab-changelog-generator] [gitlab-changelog-generator] generate prepared
[gitlab-changelog-generator] [gitlab-changelog-generator] generating changelog...
C:\ts\data\workspace\test-gitlab-changelog-generator\node_modules\rxjs\Subscriber.js:238
            throw err;
            ^

TypeError: milestones.sort is not a function
    at SafeSubscriber.awaitMilestones.subscribe [as _next] (C:\ts\data\workspace\test-gitlab-changelog-genera
tor\node_modules\gitlab-changelog-generator\dist\generator.js:28:41)
    at SafeSubscriber.__tryOrUnsub (C:\ts\data\workspace\test-gitlab-changelog-generator\node_modules\rxjs\Subscriber.js:234:16)
    at SafeSubscriber.next (C:\ts\data\workspace\test-gitlab-changelog-generator\node_modules\rxjs\Subscriber.js:183:22)
    at Subscriber._next (C:\ts\data\workspace\test-gitlab-changelog-generator\node_modules\rxjs\Subscriber.js:125:26)
    at Subscriber.next (C:\ts\data\workspace\test-gitlab-changelog-generator\node_modules\rxjs\Subscriber.js:89:18)
    at cb (C:\ts\data\workspace\test-gitlab-changelog-generator\node_modules\gitlab-changelog-generator\dist\generator.js:134:34)
    at C:\ts\data\workspace\test-gitlab-changelog-generator\node_modules\gitlab-kirakishin\lib\Models\ProjectMilestones.js:87:22
    at C:\ts\data\workspace\test-gitlab-changelog-generator\node_modules\gitlab-kirakishin\lib\ApiBaseHTTP.js:96:22
    at _Class.wrap_response (C:\ts\data\workspace\test-gitlab-changelog-generator\node_modules\slumber\lib\API.js:192:18)
    at _Class.wrap_response (C:\ts\data\workspace\test-gitlab-changelog-generator\node_modules\slumber\lib\API.js:4:59)

Besides, it would be nice to have examples of integrations ;)

Thx.

chrisvdp commented 6 years ago

@kirakishin you don't need to have a bin, you need to add the bin property to your package.json file https://docs.npmjs.com/files/package.json#bin

SunnySunning commented 6 years ago

@Gouigouix you maybe should try --url='www.gitlab.com', not the full project path.