Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Cannot Find Module "api-console-cli-build" on Windows #12

Closed
lukibsubekti opened this issue Oct 24, 2017 · 7 comments
Closed

Cannot Find Module "api-console-cli-build" on Windows #12

lukibsubekti opened this issue Oct 24, 2017 · 7 comments
Assignees
Labels

Comments

@lukibsubekti
Copy link

I have tried installing it globally and locally. But, when I run:

$ api-console build --help

or (for local):

$ ./node_modules/.bin/api-console build --help

on my Windows, it results:

Error: Cannot find module 'my\current\path\api-console-cli-build'
    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:383:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:496:3

I tried on my Linux and Mac, it works normally. I use latest Node and NPM.

@jarrodek
Copy link
Contributor

Thank you for the issue report.
I have to investigate this on Windows.

@amcsi
Copy link

amcsi commented Nov 9, 2017

Please make this project cross-platform :(

@jarrodek
Copy link
Contributor

It actually is cross-platform but not cross-all-node-versions.
Which node version do you use?
Most dependencies of this project requires node >= 6.4.0

I have installed the CLI tool just a minute ago on my windows machine and it is installed and working . So the only thing I can think of right now is node's version.

@jarrodek jarrodek removed the bug label Nov 11, 2017
@jarrodek
Copy link
Contributor

This is fixed by 8a0b46c
If not please reopen.

@amcsi
Copy link

amcsi commented Nov 11, 2017

This still doesn't work, unfortunately.

C:\Users\attila\project>node -v
v8.7.0

C:\Users\attila\project>api-console -V
0.2.5

C:\Users\attila\project>api-console serve documentation/
module.js:473
      throw err;
      ^

Error: Cannot find module 'C:\Users\attila\project\api-console-cli-serve'
    at Function.Module._resolveFilename (module.js:527:15)
    at Function.Module._load (module.js:453:25)
    at Function.Module.runMain (module.js:665:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3

C:\Users\attila\project>api-console build documentation\documentation.raml
module.js:473
      throw err;
      ^

Error: Cannot find module 'C:\Users\attila\project\api-console-cli-build'
    at Function.Module._resolveFilename (module.js:527:15)
    at Function.Module._load (module.js:453:25)
    at Function.Module.runMain (module.js:665:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3

@jarrodek jarrodek reopened this Nov 13, 2017
@jarrodek
Copy link
Contributor

OK, thank you for detailed description. I'll try to fix it in the morning.

@jarrodek jarrodek added the bug label Nov 13, 2017
@jarrodek
Copy link
Contributor

jarrodek commented Nov 13, 2017

Hi,

Thank you all for your patience. I've isolated the problem. It appears to be an issue with helper library. I've reported an issue already: tj/commander.js#714
Also, I've prepared a workaround in the CLI tool which enables use of the CLI tool on Windows.
I will release it later today after writing few tests that ensures that this will not happen again.

Sorry guys for that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants