Vue-apollo: Installation fails with server option

Created on 22 Jul 2019  路  3Comments  路  Source: vuejs/vue-apollo

Environment:

  • yarn v1.17.3

    • @vue/cli 3.9.3

    • MacOS 10.14.5

Steps to reproduce:

vue create hello-apollo
cd hello-apollo
vue add apollo
? Add example code? Yes
? Add a GraphQL API Server? Yes
? Enable automatic mocking? Yes
? Configure Apollo Engine? No

Error:

Running completion hooks...
ERROR  Error: Command failed with exit code 2 (ENOENT):
vue-cli-service apollo:schema:generate

As shown, vue-cli-service exists in ./node_modules/.bin and this is not in my $PATH, as it shouldn't be. The completion hooks tries to run it directly. As soon as I've added ./node_modules/.bin to $PATH, everything worked.

Most helpful comment

rm -rf node_modules package-lock.json && npm install

All 3 comments

rm -rf node_modules package-lock.json && npm install

rm -rf node_modules package-lock.json && npm install

Worked for me, thanks

Closing for being not related to this repository, and resolved.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

beeplin picture beeplin  路  4Comments

anymost picture anymost  路  3Comments

ais-one picture ais-one  路  4Comments

dsbert picture dsbert  路  4Comments

alx13 picture alx13  路  4Comments