Skip to content

Custom VueJS component build failure #846

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

Closed
flacito opened this issue Sep 16, 2018 · 5 comments
Closed

Custom VueJS component build failure #846

flacito opened this issue Sep 16, 2018 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@flacito
Copy link

flacito commented Sep 16, 2018

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.

Bug report

Version

0.14.4

Steps to reproduce

  1. Running npx vuepress dev works fine
  2. Running npx 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

What is expected?

Success full build with vuepress build (I'm actually running npx vuepress build in the repo build)

What is actually happening?

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

Other relevant information

  • Your OS: Mac OS 10.13.6
  • Node.js version: 10.7.0
  • Browser version: not applicable, vuepress CLI issue
  • Is this a global or local install? local, run using npx
  • Which package manager did you use for the install? npm
@ulivz
Copy link
Member

ulivz commented Sep 17, 2018

Fixed it by removing the import of 'wired-elements', so the problem is how to server render web components.

@ulivz ulivz added the help wanted Extra attention is needed label Sep 17, 2018
@flacito
Copy link
Author

flacito commented Sep 17, 2018

@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.

@ekoeryanto
Copy link
Contributor

just dig a little, see rough-stuff/wired-elements#16

@QMangoJ
Copy link

QMangoJ commented Dec 7, 2018

  • I'm in this trouble just now, and i solved the problem with the command that npx vuepress build.

@shigma
Copy link
Collaborator

shigma commented Mar 8, 2019

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

@shigma shigma closed this as completed Mar 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants