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

apply is not a function at Generator.Plugins.forEach #4024

Closed
CodeSpent opened this issue May 18, 2019 · 4 comments
Closed

apply is not a function at Generator.Plugins.forEach #4024

CodeSpent opened this issue May 18, 2019 · 4 comments

Comments

@CodeSpent
Copy link

CodeSpent commented May 18, 2019

Version

3.7.0

Reproduction link

https://github.com/CodeSpent/CodeSpent.dev

Environment info

Environment Info:

  System:
    OS: Windows 10
    CPU: (4) x64 Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
  Binaries:
    Node: 10.15.3 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 44.17763.1.0
  npmPackages:
    @fortawesome/vue-fontawesome: ^0.1.6 => 0.1.6
    @sagalbot/vueable: 0.0.3 => 0.0.3
    vue: ^2.5.11 => 2.6.10
    vue-chartjs: ^3.4.2 => 3.4.2
    vue-cli-webpack:  1.0.0
    vue-github-api: ^0.1.7 => 0.1.7
    vue-hot-reload-api:  2.3.3
    vue-loader: ^13.0.5 => 13.7.3
    vue-resource:  1.5.1
    vue-style-loader:  3.1.2
    vue-template-compiler: ^2.4.4 => 2.6.10
    vue-template-es2015-compiler:  1.9.1
    vuetify: ^1.5.14 => 1.5.14
    vuex: ^3.1.1 => 3.1.1
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

use vue add router

What is expected?

vue add router

What is actually happening?

? Use history mode for router? (Requires proper server setup for index fallback in production) No
(node:4328) UnhandledPromiseRejectionWarning: TypeError: apply is not a function
    at Generator.plugins.forEach (C:\Users\hanfo\AppData\Roaming\npm\node_modules\@vue\cli\lib\Generator.js:103:7)
    at Array.forEach (<anonymous>)
    at new Generator (C:\Users\hanfo\AppData\Roaming\npm\node_modules\@vue\cli\lib\Generator.js:101:13)
    at Function.runGenerator (C:\Users\hanfo\AppData\Roaming\npm\node_modules\@vue\cli\lib\invoke.js:123:21)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:4328) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)(node:4328) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```

<!-- generated by vue-issues. DO NOT REMOVE -->
@CodeSpent
Copy link
Author

This also occurs on my desktop which is a similar environment. Is it a dependency not compatible with Windows possibly?

@haoqunjiang
Copy link
Member

This error may occur when your node_modules does not contain any actual Vue CLI plugins. Please rerun npm install and try again.

We need to improve the error message, though.

@pksunkara
Copy link
Contributor

@sodatea Can you close this? Fixed by #4242

@haoqunjiang
Copy link
Member

😂forgot to put the fix keyword before each issue id.

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

3 participants