Closed loremaps closed 6 years ago
Is anybody else experiencing this problem?
@loremaps would be good to know more about your setup: OS, Node version, NPM version
OS: Ubuntu 16.04 LTS npm: 5.5.1 node: 8.9.3
I also reproduced it in another machine with
OS: Ubuntu 16.04 LTS npm: 5.6.0 node: 8.9.3
It seems that the problem is caused by the jonschlijonschlinkert/npm-paths dependency; which does not return the correct paths for my case. If I hardcode my global npm path here: https://github.com/graphql-cli/graphql-cli/blob/be73eec100749f07dcfe2ad978ee5dcea195b1fc/src/index.ts#L29
The error is no longer reported.
Specifically, the first path returned by the npmPaths()
is:
/home/username/tests/graphql-cli/~/.npm-global/lib/node_modules
but in my case the correct path is:
/home/username/.npm-global/lib/node_modules
Thanks for further digging into this @loremaps. Would be great if you can figure out a solution that works also in your case that we can introduce as a fix in graphql-cli
.
Fixed in the latest release 2.1.3
. Thanks @schickling
I just tried to install graphql-cli with a plugin (codegen but it is the same with voyager)
graphql -v
reports2.0.9
and seems to works ok. However, I cannot call the plugin:graphql codegen
shows the error:Am I missing something here? Thanks