Skip to content

TypeError [ERR_INVALID_URL]: Invalid URL #8641

Open
@jianjiachenghub

Description

@jianjiachenghub

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

I am using Vercel to deploy the Docusaurus site, But report an error when packing online, "TypeError [ERR_INVALID_URL]: Invalid URL", And local packaging will not report this error.

I consulted Vercel’s members, feedback that it is Docusaurus’s problem. They think hardcoding the url in docusaurus is what conflicting the problem? Unfortunately, docusaurus doesn't generate helpful error to give more verbose information.

You can see my history Commit. There is no modification of deployment related configuration, but some can be deployed successfully.I just modified the content of the Markdown file, so I can make the deployment fail or succeed. This looks abnormal.
image
image

[14:39:02.935] Cloning github.com/jianjiachenghub/frontend-document (Branch: minimal_reproducible, Commit: 5f02832)
[14:39:06.674] Cloning completed: 3.739s
[14:39:06.866] Restored build cache
[14:39:06.907] Running "vercel build"
[14:39:07.345] Vercel CLI 28.13.2
[14:39:07.959] Warning: Detected "engines": { "node": ">=16.14" } in your `package.json` that will automatically upgrade when a new major Node.js Version is released. Learn More: http://vercel.link/node-version
[14:39:07.969] Running "install" command: `npm install`...
[14:39:16.115] 
[14:39:16.115] up to date, audited 1087 packages in 8s
[14:39:16.258] 
[14:39:16.258] 28 vulnerabilities (4 moderate, 23 high, 1 critical)
[14:39:16.258] 
[14:39:16.258] To address issues that do not require attention, run:
[14:39:16.258]   npm audit fix
[14:39:16.258] 
[14:39:16.258] Some issues need review, and may require choosing
[14:39:16.258] a different dependency.
[14:39:16.258] 
[14:39:16.258] Run `npm audit` for details.
[14:39:16.602] 
[14:39:16.602] > [email protected] build
[14:39:16.602] > docusaurus build
[14:39:16.602] 
[14:39:18.135] [INFO] [zh-Hans] Creating an optimized production build...
[14:39:18.910] [info] [webpackbar] Compiling Client
[14:39:18.929] [info] [webpackbar] Compiling Server
[14:39:24.030] [success] [webpackbar] Client: Compiled with some errors in 5.13s
[14:39:24.034] 
[14:39:24.035] 
[14:39:24.035] TypeError [ERR_INVALID_URL]: Invalid URL
[14:39:24.035] [ERROR] Client bundle compiled with errors therefore further build is impossible.
[14:39:24.070] Error: Command "npm run build" exited with 1

Reproducible demo

No response

Steps to reproduce

  1. Use Vercel to import project(https://github.com/jianjiachenghub/frontend-document/tree/minimal_reproducible)
  2. Use Vercel's online deployment capabilities

Expected behavior

Local and online packaging is normal

Actual behavior

Local packaging is normal, but Vercel's online packaging fails

Your environment

Self-service

  • I'd be willing to fix this bug myself.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    apprenticeIssues that are good candidates to be handled by a Docusaurus apprentice / traineebugAn error in the Docusaurus core causing instability or issues with its executiondomain: markdownRelated to Markdown parsing or syntax

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions