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

vue init webpack my-project has an error: co(...).apply is not a function #571

Closed
fujing125 opened this issue Aug 27, 2017 · 3 comments
Closed

Comments

@fujing125
Copy link

`
~ vue list

Available official templates:

★ browserify - A full-featured Browserify + vueify setup with hot-reload, linting & unit testing.
★ browserify-simple - A simple Browserify + vueify setup for quick prototyping.
★ pwa - PWA template for vue-cli based on the webpack template
★ simple - The simplest possible Vue setup in a single HTML file
★ webpack - A full-featured Webpack + vue-loader setup with hot reload, linting, testing & css extraction.
★ webpack-simple - A simple Webpack + vue-loader setup for quick prototyping.

➜ ~ vue init webpack my-project

/usr/local/lib/node_modules/vue-cli/node_modules/_unyield@0.0.1@unyield/index.js:29
? co(gen).apply(this, arguments)
^

TypeError: co(...).apply is not a function
at Metalsmith.build (/usr/local/lib/node_modules/vue-cli/node_modules/_unyield@0.0.1@unyield/index.js:29:17)
at generate (/usr/local/lib/node_modules/vue-cli/lib/generate.js:66:6)
at /usr/local/lib/node_modules/vue-cli/bin/vue-init:153:5
at /usr/local/lib/node_modules/vue-cli/node_modules/_download-git-repo@0.2.2@download-git-repo/index.js:43:22
at /usr/local/lib/node_modules/vue-cli/node_modules/download/index.js:165:3
at callback (/usr/local/lib/node_modules/vue-cli/node_modules/_each-async@1.1.1@each-async/index.js:38:4)
at onetime (/usr/local/lib/node_modules/vue-cli/node_modules/_onetime@1.1.0@onetime/index.js:22:12)
at /usr/local/lib/node_modules/vue-cli/node_modules/download/index.js:156:5
at ConcatStream. (/usr/local/lib/node_modules/vue-cli/node_modules/_concat-stream@1.6.0@concat-stream/index.js:36:43)
at emitNone (events.js:91:20)
at ConcatStream.emit (events.js:186:7)
at finishMaybe (/usr/local/lib/node_modules/vue-cli/node_modules/_readable-stream@2.3.3@readable-stream/lib/_stream_writable.js:607:14)
at endWritable (/usr/local/lib/node_modules/vue-cli/node_modules/_readable-stream@2.3.3@readable-stream/lib/_stream_writable.js:615:3)
at ConcatStream.Writable.end (/usr/local/lib/node_modules/vue-cli/node_modules/_readable-stream@2.3.3@readable-stream/lib/_stream_writable.js:571:41)
at DuplexWrapper.onend (/usr/local/lib/node_modules/vue-cli/node_modules/_readable-stream@2.3.3@readable-stream/lib/_stream_readable.js:570:10)
at Object.onceWrapper (events.js:291:19)
`

@LinusBorg
Copy link
Member

LinusBorg commented Aug 27, 2017

I would assume this is a version problem somehow. What is your:

  • vue-cli version?
  • node version?
  • npm version?

@xpawel115
Copy link

I have an error message, when I want execute "npm install --global vue-cli"

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\vue-cli\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "--global" "vue-cli"
npm ERR! node v6.9.4
npm ERR! npm v3.10.10
npm ERR! path C:\Users\komputer 2\AppData\Roaming\npm\node_modules\vue-cli\node_modules\js-beautify\js\bin\css-beautify.js
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod 'C:\Users\komputer 2\AppData\Roaming\npm\node_modules\vue-cli\node_modules\js-beautify\js\bin\css-beautify.js'
npm ERR! enoent ENOENT: no such file or directory, chmod 'C:\Users\komputer 2\AppData\Roaming\npm\node_modules\vue-cli\node_modules\js-beautify\js\bin\css-beautify.js'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\komputer 2\Desktop\npm-debug.log
npm ERR! code 1

Can anyone help me ?

@posva
Copy link
Member

posva commented Sep 18, 2017

@xpawel115 look #591 and #592
as for the issue, closing for inactivity

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

No branches or pull requests

4 participants