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-cli PWA plugin generates a project that cannot be built #893

Closed
nanomad opened this issue Feb 27, 2018 · 1 comment
Closed

vue-cli PWA plugin generates a project that cannot be built #893

nanomad opened this issue Feb 27, 2018 · 1 comment

Comments

@nanomad
Copy link
Contributor

nanomad commented Feb 27, 2018

Version

3.0.0-beta.1

Reproduction link

https://github.com/nanomad/vue-cli-pwa-build-failure

Steps to reproduce

  • Install latest vue cli 3.0.0-beta.
  • Select the following features:
  • PWA
  • Use npm as package manager (but it happens with yarn as well)
  • Use separated config files (just in case it matters)
  • cd into folder
  • run npm build

What is expected?

Build completes successfully

What is actually happening?

Build fails with the following error

> vue-cli-service build


|  Building for production...buffer.js:202
  throw new TypeError(kFromErrorMsg);
  ^

TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.
    at Function.Buffer.from (buffer.js:202:9)
    at new Buffer (buffer.js:158:17)
    at writeOut (C:\Users\gcond\Documents\Progetti\demo-ts-4\node_modules\webpack\lib\Compiler.js:334:17)
    at require.forEach (C:\Users\gcond\Documents\Progetti\demo-ts-4\node_modules\webpack\lib\Compiler.js:345:12)
    at C:\Users\gcond\Documents\Progetti\demo-ts-4\node_modules\async\dist\async.js:3096:16
    at eachOfArrayLike (C:\Users\gcond\Documents\Progetti\demo-ts-4\node_modules\async\dist\async.js:1055:9)
    at eachOf (C:\Users\gcond\Documents\Progetti\demo-ts-4\node_modules\async\dist\async.js:1103:5)
    at Object.eachLimit (C:\Users\gcond\Documents\Progetti\demo-ts-4\node_modules\async\dist\async.js:3158:5)
    at emitFiles (C:\Users\gcond\Documents\Progetti\demo-ts-4\node_modules\webpack\lib\Compiler.js:315:21)
    at C:\Users\gcond\Documents\Progetti\demo-ts-4\node_modules\mkdirp\index.js:30:20
    at FSReqWrap.oncomplete (fs.js:135:15)

Since it was working fine before, I suppose the PWA plugin is pulling in a transitive dependency that's not compatibile anymore...

@nanomad
Copy link
Contributor Author

nanomad commented Feb 27, 2018

Found the issue:

If I manually change the depenency to [email protected] then everything works. I suppose it's better if it was declared as ^3.0.0-beta.0

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

1 participant