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

build a library or web component throw error when enable pwa #1497

Closed
anhulife opened this issue Jun 7, 2018 · 2 comments
Closed

build a library or web component throw error when enable pwa #1497

anhulife opened this issue Jun 7, 2018 · 2 comments
Labels
needs reproduction This issue is missing a minimal runnable reproduction, provided by the author

Comments

@anhulife
Copy link

anhulife commented Jun 7, 2018

Version

3.0.0-beta.15

Reproduction link

https://codesandbox.io/s/vue

Steps to reproduce

build a web component

./node_modules/.bin/vue-cli-service build --target wc --name hello-world src/components/HelloWorld.vue

What is expected?

vue-cli-service will produce a single JavaScript file (and its minified version) with everything inlined.

What is actually happening?

this command exit with a error.

Building for production as web component... ERROR  TypeError: Cannot read property 'tapAsync' of undefined
TypeError: Cannot read property 'tapAsync' of undefined
    at compiler.hooks.compilation.tap.compilation (/Users/******/Sources/vue-cli-demo/node_modules/@vue/cli-plugin-pwa/lib/HtmlPwaPlugin.js:18:63)
    at SyncHook.eval [as call] (eval at create (/Users/******/Sources/vue-cli-demo/node_modules/tapable/lib/HookCodeFactory.js:17:12), <anonymous>:15:1)
    at SyncHook.lazyCompileHook [as _call] (/Users/******/Sources/vue-cli-demo/node_modules/tapable/lib/Hook.js:35:21)
    at Compiler.newCompilation (/Users/******/Sources/vue-cli-demo/node_modules/webpack/lib/Compiler.js:451:26)
    at hooks.beforeCompile.callAsync.err (/Users/******/Sources/vue-cli-demo/node_modules/webpack/lib/Compiler.js:487:29)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/******/Sources/vue-cli-demo/node_modules/tapable/lib/HookCodeFactory.js:24:12), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook [as _callAsync] (/Users/******/Sources/vue-cli-demo/node_modules/tapable/lib/Hook.js:35:21)
    at Compiler.compile (/Users/******/Sources/vue-cli-demo/node_modules/webpack/lib/Compiler.js:482:28)
    at readRecords.err (/Users/******/Sources/vue-cli-demo/node_modules/webpack/lib/Compiler.js:221:11)
    at Compiler.readRecords (/Users/******/Sources/vue-cli-demo/node_modules/webpack/lib/Compiler.js:349:11)
    at hooks.run.callAsync.err (/Users/******/Sources/vue-cli-demo/node_modules/webpack/lib/Compiler.js:218:10)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/******/Sources/vue-cli-demo/node_modules/tapable/lib/HookCodeFactory.js:24:12), <anonymous>:6:1)
    at AsyncSeriesHook.lazyCompileHook [as _callAsync] (/Users/******/Sources/vue-cli-demo/node_modules/tapable/lib/Hook.js:35:21)
    at hooks.beforeRun.callAsync.err (/Users/******/Sources/vue-cli-demo/node_modules/webpack/lib/Compiler.js:215:19)
    at AsyncSeriesHook.eval [as callAsync] (eval at create (/Users/******/Sources/vue-cli-demo/node_modules/tapable/lib/HookCodeFactory.js:24:12), <anonymous>:15:1)
    at AsyncSeriesHook.lazyCompileHook [as _callAsync] (/Users/******/Sources/vue-cli-demo/node_modules/tapable/lib/Hook.js:35:21)
@LinusBorg LinusBorg added the needs reproduction This issue is missing a minimal runnable reproduction, provided by the author label Jun 7, 2018
@LinusBorg
Copy link
Member

Please provide a reproduction so we can see exactly which plugins you installed etc.

@anhulife
Copy link
Author

anhulife commented Jun 8, 2018

sorry about that, i create a new issue #1515 with a reproduction repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs reproduction This issue is missing a minimal runnable reproduction, provided by the author
Projects
None yet
Development

No branches or pull requests

2 participants