I've created a project from scratch using vue-cli and the ts-vue preset. When I try adding the vue-cli-plugin-apollo (through vue-cli UI) I get the following error (after the configuration step) :
{"type":"warning","data":"../package.json: No license field"}
{"type":"warning","data":"\"@vue/cli-plugin-babel > [email protected]\" has unmet peer dependency \"webpack@>=2\"."}
{"type":"warning","data":"\"@vue/cli-plugin-eslint > [email protected]\" has unmet peer dependency \"webpack@>=2.0.0 <5.0.0\"."}
{"type":"warning","data":"\"@vue/cli-plugin-typescript > [email protected]\" has unmet peer dependency \"webpack@^2.3.0 || ^3.0.0 || ^4.0.0\"."}
{"type":"warning","data":"\"@vue/eslint-config-airbnb > [email protected]\" has unmet peer dependency \"eslint@^4.9.0\"."}
{"type":"warning","data":"\"@vue/eslint-config-airbnb > [email protected]\" has unmet peer dependency \"webpack@>=1.11.0\"."}
{"type":"warning","data":"\"@vue/eslint-config-airbnb > [email protected]\" has unmet peer dependency \"[email protected] - 4.x\"."}
{"type":"warning","data":"\"@vue/eslint-config-typescript > [email protected]\" has unmet peer dependency \"typescript@*\"."}
{"type":"warning","data":"\" > [email protected]\" has unmet peer dependency \"webpack@^3.0.0 || ^4.0.0\"."}
{"type":"warning","data":"\"vue-cli-plugin-apollo > [email protected]\" has incorrect peer dependency \"[email protected]\"."}
{"type":"warning","data":"\" > [email protected]\" has unmet peer dependency \"@vue/cli-shared-utils@^3.0.0-beta.11\"."}
{"type":"warning","data":"\" > [email protected]\" has unmet peer dependency \"chalk@^2.3.1\"."}
SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at Socket.child.stdout.on.buffer (/Users/scleriot/.config/yarn/global/node_modules/@vue/cli/lib/util/installDeps.js:117:31)
at Socket.emit (events.js:182:13)
at addChunk (_stream_readable.js:279:12)
at readableAddChunk (_stream_readable.js:264:11)
at Socket.Readable.push (_stream_readable.js:219:10)
at Pipe.onread (net.js:636:20)
{"type":"tree","data":{"type":"newAllDependencies","trees":[{"name":"@babel/[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"@types/[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"@types/[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"@types/[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"@types/[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"@types/[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"@types/[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"@types/[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"@types/[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"@types/[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"@types/[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"@types/[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"@types/[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"@types/[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"@types/[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"@types/[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"@types/[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"@types/[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint
":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0},{"name":"[email protected]","children":[],"hint":null,"color":null,"depth":0}]}}
๐ Invoking generator for vue-cli-plugin-apollo...
โ ธ Installing additional dependencies...{"type":"warning","data":"../package.json: No license field"}
โ Installing additional dependencies...{"type":"warning","data":"\" > [email protected]\" has unmet peer dependency \"apollo-client@^2.0.0\"."}
{"type":"warning","data":"\"@vue/cli-plugin-babel > [email protected]\" has unmet peer dependency \"webpack@>=2\"."}
{"type":"warning","data":"\"@vue/cli-plugin-eslint > [email protected]\" has unmet peer dependency \"webpack@>=2.0.0 <5.0.0\"."}
โ Installing additional dependencies...{"type":"warning","data":"\"@vue/cli-plugin-typescript > [email protected]\" has unmet peer dependency \"webpack@^2.3.0 || ^3.0.0 || ^4.0.0\"."}
โ น Installing additional dependencies...{"type":"warning","data":"\"@vue/eslint-config-airbnb > [email protected]\" has unmet peer dependency \"eslint@^4.9.0\"."}
{"type":"warning","data":"\"@vue/eslint-config-airbnb > [email protected]\" has unmet peer dependency \"webpack@>=1.11.0\"."}
{"type":"warning","data":"\"@vue/eslint-config-airbnb > [email protected]\" has unmet peer dependency \"[email protected] - 4.x\"."}
{"type":"warning","data":"\"@vue/eslint-config-typescript > [email protected]\" has unmet peer dependency \"typescript@*\"."}
{"type":"warning","data":"\" > [email protected]\" has unmet peer dependency \"graphql@^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0\"."}
{"type":"warning","data":"\" > [email protected]\" has unmet peer dependency \"webpack@^3.0.0 || ^4.0.0\"."}
{"type":"warning","data":"\" > [email protected]\" has unmet peer dependency \"@vue/cli-shared-utils@^3.0.0-beta.11\"."}
{"type":"warning","data":"\" > [email protected]\" has unmet peer dependency \"chalk@^2.3.1\"."}
โ ธ Installing additional dependencies...{"type":"warning","data":"\"vue-cli-plugin-apollo > [email protected]\" has incorrect peer dependency \"[email protected]\"."}
๐ฆ Installing additional dependencies...
โ Running completion hooks...error: 'vue-cli-plugin-apollo' should be listed in the project's dependencies, not devDependencies (import/no-extraneous-dependencies) at src/vue-apollo.js:3:1:
1 | import Vue from 'vue';
2 | import VueApollo from 'vue-apollo';
> 3 | import { createApolloClient, restartWebsockets } from 'vue-cli-plugin-apollo/graphql-client';
| ^
4 |
5 | // Install the vue plugin
6 | Vue.use(VueApollo);