Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run "vue ui" command on the terminal (vue-cli-plugin-apollo) #1564

Closed
alejandrolsca opened this issue Jun 13, 2018 · 16 comments
Closed

Comments

@alejandrolsca
Copy link

alejandrolsca commented Jun 13, 2018

Version

3.0.0-rc.1

Reproduction link

http://www.no-url-this-is-in-the.terminal

Steps to reproduce

  1. npm install -g @ vue/cli
  2. vue ui

What is expected?

I expect to see the graphical interface in the browser

What is actually happening?

I receive the following error:

sh-3.2# vue ui
/usr/local/lib/node_modules/@vue/cli/node_modules/vue-cli-plugin-apollo/graphql-server/index.js:65
      ...resolvers,
      ^^^

SyntaxError: Unexpected token ...
    at createScript (vm.js:74:10)
    at Object.runInThisContext (vm.js:116:10)
    at Module._compile (module.js:533:28)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/@vue/cli/node_modules/@vue/cli-ui/server.js:1:80)
@Akryum
Copy link
Member

Akryum commented Jun 13, 2018

Which version of node are you using?

@TAGC
Copy link

TAGC commented Jun 13, 2018

This works fine for me on macOS with 3.0.0-rc.1. Also I didn't realise vui ui was a thing - very cool.

@jesse-li
Copy link

me too
node v8.0

@alejandrolsca
Copy link
Author

I'm using v8.1.2

@TAGC
Copy link

TAGC commented Jun 14, 2018

I was using node v9 (which worked) and I've just updated to v10.4.1 which also works.

@Akryum
Copy link
Member

Akryum commented Jun 14, 2018

@alejandrolsca Try with the latest LTS 8.11.x.

@yoyoys
Copy link

yoyoys commented Jun 16, 2018

Same Problems here

node 8.11.1
vue cli 3.0.0-rc2

🚀  Starting GUI...
 ERROR  Syntax Error: Unexpected [

GraphQL request (77:1)
          76: }
77: [object Object]
              ^
           78:

GraphQLError: Syntax Error: Unexpected [
    at syntaxError (/Users/yoyoys/.config/yarn/global/node_modules/graphql/error/syntaxError.js:24:10)
    at unexpected (/Users/yoyoys/.config/yarn/global/node_modules/graphql/language/parser.js:1322:33)
    at parseDefinition (/Users/yoyoys/.config/yarn/global/node_modules/graphql/language/parser.js:152:9)
    at parseDocument (/Users/yoyoys/.config/yarn/global/node_modules/graphql/language/parser.js:110:22)
    at Object.parse (/Users/yoyoys/.config/yarn/global/node_modules/graphql/language/parser.js:38:10)
    at buildSchemaFromTypeDefinitions (/Users/yoyoys/.config/yarn/global/node_modules/graphql-tools/dist/schemaGenerator.js:178:33)
    at _generateSchema (/Users/yoyoys/.config/yarn/global/node_modules/graphql-tools/dist/schemaGenerator.js:97:18)
    at makeExecutableSchema (/Users/yoyoys/.config/yarn/global/node_modules/graphql-tools/dist/schemaGenerator.js:110:20)
    at module.exports (/Users/yoyoys/.config/yarn/global/node_modules/@vue/cli-ui/node_modules/vue-cli-plugin-apollo/graphql-server/index.js:62:18)
    at ui (/Users/yoyoys/.config/yarn/global/node_modules/@vue/cli/lib/ui.js:50:3)

@Akryum Akryum added the bug label Jun 16, 2018
@MrCoder
Copy link

MrCoder commented Jun 17, 2018

Same problem for me with node v8.1.1. It works fine on v8.11.2.

@Akryum Akryum closed this as completed in 8b9477f Jun 17, 2018
@yoyoys
Copy link

yoyoys commented Jul 6, 2018

@Akryum still problems, node v8.11.3, v10.6.0

@fontzter
Copy link

Still an issue for me as well, v10.5.0

@azulkipli
Copy link

I use node v8.9.1 vue-cli 3.0.0-beta.6
got Unknown command ui.

@Akryum
Copy link
Member

Akryum commented Aug 17, 2018

vue-cli 3.0.0-beta.6

🙈

@azulkipli
Copy link

azulkipli commented Aug 21, 2018 via email

@himynameisoleg
Copy link

removing /usr/bin/lib/node_modules/vue and reinstalling vue cli worked for me

@premiumayodele
Copy link

I could see the GUI when I run vue ui, and then when creating a project, I selected the npm as the Package Manager from the dropdown list and on the Preset section I chose the default (babel, eslint), but when I click on Create Project button I get NO_MODULES error. I then checked the terminal to see this error below

$ vue ui
🚀 Starting GUI...
🌠 Ready on http://localhost:8000
Error: NO_MODULES
at importProject (C:\Users\xxxx\AppData\Roaming\npm\node_modules@vue\cli\node_modules@vue\cli-ui\apollo-server\connectors\projects.js:363:11)
at progress.wrap (C:\Users\xxxx\AppData\Roaming\npm\node_modules@vue\cli\node_modules@vue\cli-ui\apollo-server\connectors\projects.js:355:12)
at process._tickCallback (internal/process/next_tick.js:68:7)

Please advise what should be done.
Thanks.

@wxb1989
Copy link

wxb1989 commented Jan 25, 2021

I could see the GUI when I run vue ui,and then when creating a project, i get this error.
SyntaxError: Unexpected token [ in JSON at position 99
at JSON.parse ()
at getParseResult (C:\Users\xuebingwang\AppData\Roaming\npm\node_modules@vue\cli\node_modules@akryum\winattr\lib\shell\index.js:31:17)
at C:\Users\xuebingwang\AppData\Roaming\npm\node_modules@vue\cli\node_modules@akryum\winattr\lib\shell\index.js:102:14
at ChildProcess. (C:\Users\xuebingwang\AppData\Roaming\npm\node_modules@vue\cli\node_modules@akryum\winattr\lib\shell\index.js:84:5)
at ChildProcess.emit (events.js:315:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests