Regarding #844, this is _not_ a dup of #786. I do not have another project running either vuepress dev or vuepress build at the time I run vuepress build on the project that is seeing this problem.
NOTE: this failure is happening in a CI build. There are no other VuePress projects on the machine.
0.14.4
npx vuepress dev works finenpx vuepress build results in a compile error for my custom component in the repo below, error is below
https://dev.azure.com/flacito/hello-azure-app-service/_git/hello-azure-vuepress
Success full build with vuepress build (I'm actually running npx vuepress build in the repo build)
This is the log from the Azure DevOps build but the same happens on Mac OS 10.13.6
2018-09-16T13:13:11.5584494Z ##[section]Starting: CmdLine
2018-09-16T13:13:11.5717385Z ==============================================================================
2018-09-16T13:13:11.5733273Z Task : Command Line
2018-09-16T13:13:11.5749176Z Description : Run a command line script using cmd.exe on Windows and bash on macOS and Linux.
2018-09-16T13:13:11.5766077Z Version : 2.136.0
2018-09-16T13:13:11.5780681Z Author : Microsoft Corporation
2018-09-16T13:13:11.5797145Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=613735)
2018-09-16T13:13:11.5812205Z ==============================================================================
2018-09-16T13:13:11.8926550Z Generating script.
2018-09-16T13:13:11.9123229Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/14afefc2-5bfb-4807-89fc-62845d33a667.sh
2018-09-16T13:13:34.2134705Z npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
2018-09-16T13:13:34.2155574Z npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2018-09-16T13:13:34.2165074Z
2018-09-16T13:13:34.2185439Z added 1316 packages from 670 contributors and audited 11942 packages in 21.92s
2018-09-16T13:13:34.2204695Z found 0 vulnerabilities
2018-09-16T13:13:34.2212369Z
2018-09-16T13:13:34.4338746Z
2018-09-16T13:13:34.4358552Z > [email protected] build /home/vsts/work/1/s
2018-09-16T13:13:34.4377983Z > npx vuepress build
2018-09-16T13:13:34.4386333Z
2018-09-16T13:13:35.0965321Z
2018-09-16T13:13:35.0986695Z WAIT Extracting site metadata...
2018-09-16T13:13:36.9290071Z [13:13:36] Compiling Client
2018-09-16T13:13:36.9501600Z [13:13:36] Compiling Server
2018-09-16T13:13:36.9549206Z (node:9202) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
2018-09-16T13:13:47.6991729Z [13:13:47] Compiled Server in 11s
2018-09-16T13:13:47.7325880Z [13:13:47] Compiled Client in 11s
2018-09-16T13:13:47.7758145Z WAIT Rendering static HTML...
2018-09-16T13:13:47.8533414Z [2K[1GRendering page: /[2K[1GRendering page: /seesecret.html FAIL Error rendering /seesecret.html:
2018-09-16T13:13:47.8551857Z Error: render function or template not defined in component: SeeSecret
2018-09-16T13:13:47.8569742Z at normalizeRender (/home/vsts/work/1/s/node_modules/vue-server-renderer/build.js:7407:13)
2018-09-16T13:13:47.8588506Z at renderComponentInner (/home/vsts/work/1/s/node_modules/vue-server-renderer/build.js:7531:3)
2018-09-16T13:13:47.8608429Z at renderComponent (/home/vsts/work/1/s/node_modules/vue-server-renderer/build.js:7502:5)
2018-09-16T13:13:47.8626759Z at resolve (/home/vsts/work/1/s/node_modules/vue-server-renderer/build.js:7563:9)
2018-09-16T13:13:47.8642329Z at <anonymous>
2018-09-16T13:13:48.7646923Z npm ERR! code ELIFECYCLE
2018-09-16T13:13:48.7667066Z npm ERR! errno 1
2018-09-16T13:13:48.7684565Z npm ERR! [email protected] build: `npx vuepress build`
2018-09-16T13:13:48.7731194Z npm ERR! Exit status 1
2018-09-16T13:13:48.7749207Z npm ERR!
2018-09-16T13:13:48.7766977Z npm ERR! Failed at the [email protected] build script.
2018-09-16T13:13:48.7783583Z npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2018-09-16T13:13:51.0483475Z
2018-09-16T13:13:51.0505396Z npm ERR! A complete log of this run can be found in:
2018-09-16T13:13:51.0523962Z npm ERR! /home/vsts/.npm/_logs/2018-09-16T13_13_48_767Z-debug.log
2018-09-16T13:13:51.0659746Z ##[error]Bash exited with code '1'.
2018-09-16T13:13:51.1157650Z ##[section]Finishing: CmdLine
Mac OS 10.13.610.7.0Fixed it by removing the import of 'wired-elements', so the problem is how to server render web components.
@ulivz, thanks for your help. I'll research, get working and post back.
btw, 鉂わ笍 your work. I see https://jamstack.org coming alive in VuePress. The repo I sent is a research experiment in this.
just dig a little, see wiredjs/wired-elements#16
So it is not an issue with VuePress. You can try out the solution in this document:
https://v1.vuepress.vuejs.org/guide/using-vue.html#browser-api-access-restrictions