Skip to content

TypeError: Cannot read property 'indexOf' of undefined #4694

Closed
@yuexing0921

Description

@yuexing0921

Version

4.0.2

Environment info

Environment Info:

  System:
    OS: macOS Mojave 10.14.6
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  Binaries:
    Node: 10.16.0 - /usr/local/bin/node
    Yarn: 1.16.0 - /usr/local/bin/yarn
    npm: 6.11.3 - /usr/local/bin/npm
  Browsers:
    Chrome: 77.0.3865.120
    Firefox: 68.0.1
    Safari: 13.0.2
  npmPackages:
    @vue/babel-preset-app:  3.1.1
    @vue/cli-overlay:  3.9.0
    @vue/cli-plugin-babel: ^3.1.0 => 3.1.1
    @vue/cli-plugin-eslint: ^3.1.0 => 3.11.0
    @vue/cli-service: ^3.8.0 => 3.9.2
    @vue/cli-shared-utils:  3.9.0 (3.11.0)
    @vue/component-compiler-utils:  2.6.0
    @vue/eslint-config-standard:  4.0.0
    @vue/eslint-config-typescript:  4.0.0
    @vue/preload-webpack-plugin:  1.1.0
    @vue/web-component-wrapper:  1.2.0
    babel-helper-vue-jsx-merge-props:  2.0.3
    babel-plugin-transform-vue-jsx:  4.0.1
    eslint-plugin-vue:  5.0.0-beta.5 (4.7.1)
    typescript: ~3.2.4 => 3.2.4 (3.5.3, 3.6.3, 2.5.3)
    vue: ^2.5.17 => 2.6.10
    vue-amap: ^0.5.10 => 0.5.10
    vue-class-component: ^6.0.0 => 6.3.2
    vue-cli-plugin-typescript: ^0.0.1 => 0.0.1
    vue-eslint-parser:  3.3.0 (2.0.3)
    vue-gen-router: ^0.0.5 => 0.0.5
    vue-hot-reload-api:  2.3.1
    vue-loader:  15.7.0
    vue-property-decorator: ^7.0.0 => 7.3.0
    vue-router: ^3.0.1 => 3.0.2
    vue-simple-uploader: ^0.6.0 => 0.6.0
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.5.17 => 2.6.10
    vue-template-es2015-compiler:  1.9.1
    vuedraggable: ^2.17.0 => 2.17.0
    vuex: ^3.0.1 => 3.0.1
  npmGlobalPackages:
    @vue/cli: 4.0.2

Steps to reproduce

npm install -g @vue/cli

vue ui

http://localhost:8000/project/create
Details => Project folder => vue-cli-4.0
Presets => vue-ts => TypeError: Cannot read property 'indexOf' of undefined

What is expected?

Normally generated project

What is actually happening?

Unable to generate, always stuck there


Installing CLI plugins. This might take a while...

🚀 Invoking generators...
📦 Installing additional dependencies...

at makeError (/usr/local/lib/node_modules/@vue/cli/node_modules/execa/index.js:174:9)
at Promise.all.then.arr (/usr/local/lib/node_modules/@vue/cli/node_modules/execa/index.js:278:16)
at process._tickCallback (internal/process/next_tick.js:68:7)

code: 1,
stdout:
'⚙ Installing CLI plugins. This might take a while...\n\n🚀 Invoking generators...\n📦 Installing additional dependencies...\n\n',
stderr: null,
failed: true,
signal: null,
cmd:
'vue create vue-cli-4.0 --skipGetStarted --packageManager yarn --inlinePreset {"useConfigFiles":false,"plugins":{"@vue/cli-plugin-babel":{},"@vue/cli-plugin-typescript":{"classComponent":true,"useTsWithBabel":true},"@vue/cli-plugin-eslint":{"config":"prettier","lintOn":["save","commit"]}},"router":true,"routerHistoryMode":false,"vuex":true}',
timedOut: false,
killed: false }
TypeError: Cannot read property 'indexOf' of undefined
at progress.wrap (/usr/local/lib/node_modules/@vue/cli/node_modules/@vue/cli-ui/apollo-server/connectors/projects.js:274:35)
at process._tickCallback (internal/process/next_tick.js:68:7)
TypeError: Cannot read property 'indexOf' of undefined
at progress.wrap (/usr/local/lib/node_modules/@vue/cli/node_modules/@vue/cli-ui/apollo-server/connectors/projects.js:274:35)
at process._tickCallback (internal/process/next_tick.js:68:7)

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions