Akryum / vue-cli-plugin-apollo

šŸš€ @vue/cli plugin for Vue Apollo
https://vue-cli-plugin-apollo.netlify.com/
479 stars 110 forks source link

Bug installing for vue 3 using cli #488

Open ccsv opened 3 years ago

ccsv commented 3 years ago

This happens when I install the apollo plugin from Dependencies Terminal output:

+ vue-cli-plugin-apollo@0.22.2
added 662 packages from 408 contributors and audited 2288 packages in 32.826s

85 packages are looking for funding
  run `npm fund` for details

found 2 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
 ERROR  Error: You cannot call "get" on a collection with no paths. Instead, check the "length" property first to verify at least 1 path exists.
Error: You cannot call "get" on a collection with no paths. Instead, check the "length" property first to verify at least 1 path exists.
    at Collection.get (C:\Users\000\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\jscodeshift\src\Collection.js:213:13)
    at injectOptions (C:\Users\000\AppData\Roaming\npm\node_modules\@vue\cli\lib\util\codemods\injectOptions.js:15:6)
    at runTransformation (C:\Users\000\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\vue-codemod\dist\src\run-transformation.js:61:17)
    at C:\Users\000\AppData\Roaming\npm\node_modules\@vue\cli\lib\Generator.js:290:23
    at Array.forEach (<anonymous>)
    at Generator.resolveFiles (C:\Users\000\AppData\Roaming\npm\node_modules\@vue\cli\lib\Generator.js:276:24)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Generator.generate (C:\Users\000\AppData\Roaming\npm\node_modules\@vue\cli\lib\Generator.js:175:5)
    at async runGenerator (C:\Users\000\AppData\Roaming\npm\node_modules\@vue\cli\lib\invoke.js:111:3)
    at async invoke (C:\Users\000\AppData\Roaming\npm\node_modules\@vue\cli\lib\invoke.js:92:3)
Error: Command failed: vue invoke vue-cli-plugin-apollo --$inlineOptions {"addExamples":false,"addServer":false,"addApolloEngine":false}

šŸš€  Invoking generator for vue-cli-plugin-apollo...

    at makeError (C:\Users\000\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\execa\index.js:174:9)
    at C:\Users\000\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\execa\index.js:278:16
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async C:\Users\000\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\@vue\cli-ui\apollo-server\connectors\plugins.js:472:7
    at async Object.wrap (C:\Users\000\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\@vue\cli-ui\apollo-server\connectors\progress.js:39:14) {
  code: 1,
  stdout: '\nšŸš€  Invoking generator for vue-cli-plugin-apollo...\n',
  stderr: null,
  failed: true,
  signal: null,
  cmd: 'vue invoke vue-cli-plugin-apollo --$inlineOptions {"addExamples":false,"addServer":false,"addApolloEngine":false}',
  timedOut: false,
  killed: false
}
removed 662 packages and audited 1626 packages in 17.328s

64 packages are looking for funding
  run `npm fund` for details

found 2 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

CLI output on build:

 ERROR  Failed to compile with 1 error8:26:08 PM

Syntax Error: TypeError: Cannot read property 'parseComponent' of undefined

But will compile normally when apollo is uninstalled

untoldbyte commented 3 years ago

Nothing works for me, I am able to resolve ERROR Error: You cannot call "get" on a collection with no paths. but the error Syntax Error: TypeError: Cannot read property 'parseComponent' of undefined is consistent!

Is this a known issue? in cli plugin

HerrBertling commented 2 years ago

This is a vue-cli 3.x plugin, not a Vue 3 plugin as stated in the readme file.

I'm not the maintainer nor can I do anything about this, but I saw several issues mentioning this and thought I could maybe provide a bit of clarity šŸ˜Š