Urigo / graphql-cli

📟 Command line tool for common GraphQL development workflows

Home Page:https://graphql-cli.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`UnhandledPromiseRejectionWarning: Error: ENOTDIR: not a directory` when using pnpm

elliottsj opened this issue · comments

Describe the bug

After installing graphql-cli using pnpm@5.5.1 and invoking node_modules/.bin/graphql with no arguments, an ENOTDIR error is raised.

To Reproduce
Steps to reproduce the behavior:

$ mkdir graphql-cli-example
$ cd graphql-cli-example
$ pnpm init -y
...
$ pnpm add graphql-cli@4.0.0
...
$ ./node_modules/.bin/graphql
(node:58370) UnhandledPromiseRejectionWarning: Error: ENOTDIR: not a directory, stat '/Users/spencerelliott/Dev/elliottsj/graphql-cli-example/node_modules/.pnpm/graphql-cli@4.0.0/node_modules/graphql-cli/dist/bin.js/node_modules/@graphql-cli/*'
(node:58370) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:58370) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Expected behavior

No error should occur.

@Urigo We need to release beta. I have been struggling to manually release using new script
More info here #1353

Looks like new script doesn't work for me.
I'm going to automate releases using GitHub actions as we do with canary - are you ok with that?