Skip to content

项目启动报错的问题 #251

@monxiaolee

Description

@monxiaolee

Describe the bug

node:internal/process/promises:391
triggerUncaughtException(err, true /* fromPromise */);
^
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'e:'
at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:239:11)
at defaultLoad (node:internal/modules/esm/load:120:3)
at nextLoad (node:internal/modules/esm/hooks:791:28)
at load (file:///E:/Project/own/Blog/surmon.me-main/node_modules/.pnpm/[email protected]/node_modules/tsx/dist/esm/index.mjs?1719991938273:2:1768)
at nextLoad (node:internal/modules/esm/hooks:791:28)
at Hooks.load (node:internal/modules/esm/hooks:383:26)
at handleMessage (node:internal/modules/esm/worker:255:24)
at Immediate.checkForMessages (node:internal/modules/esm/worker:157:28)
at process.processImmediate (node:internal/timers:478:21) {
code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}

Reproduction

平台:win10
node版本:16 18 20 22的版本都试过均是次报错
image

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz    
    Memory: 3.19 GB / 15.95 GB
  Binaries:
    Node: 22.2.0 - D:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - D:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 10.7.0 - D:\Program Files\nodejs\npm.CMD
    pnpm: 9.4.0 - D:\Program Files\nodejs\pnpm.CMD
  Browsers:
    Edge: Chromium (126.0.2592.87)
    Internet Explorer: 11.0.19041.4355
  npmPackages:
    @braintree/sanitize-url: ^7.0.2 => 7.0.4
    @sentry/vite-plugin: ^2.16.1 => 2.20.1
    @sentry/vue: ^8.2.1 => 8.13.0
    @types/compression: ^1.7.5 => 1.7.5
    @types/cookie-parser: ^1.4.7 => 1.4.7
    @types/express: ^4.17.21 => 4.17.21
    @types/fs-extra: ^11.0.4 => 11.0.4
    @types/http-proxy: ^1.17.14 => 1.17.14
    @types/lodash-es: ^4.17.12 => 4.17.12
    @types/lozad: ^1.16.4 => 1.16.4
    @types/mapbox-gl: ^3.1.0 => 3.1.0
    @types/node: ^20.12.12 => 20.14.9
    @types/qrcode: ^1.5.5 => 1.5.5
    @types/rss: ^0.0.32 => 0.0.32
    @types/serialize-javascript: ^5.0.4 => 5.0.4
    @types/ua-parser-js: ^0.7.39 => 0.7.39
    @typescript-eslint/eslint-plugin: ^7.10.0 => 7.15.0
    @typescript-eslint/parser: ^7.10.0 => 7.15.0
    @unhead/addons: ^1.9.10 => 1.9.14
    @unhead/schema: ^1.9.10 => 1.9.14
    @unhead/ssr: ^1.9.10 => 1.9.14
    @unhead/vue: ^1.9.10 => 1.9.14
    @vercel/ncc: ^0.38.1 => 0.38.1
    @vitejs/plugin-vue: ^5.0.4 => 5.0.5
    agentkeepalive: ^4.5.0 => 4.5.0
    axios: ^1.7.1 => 1.7.2
    bezier-easing: ^2.1.0 => 2.1.0
    builtin-modules: ^4.0.0 => 4.0.0
    compression: ^1.7.4 => 1.7.4
    cookie-parser: ^1.4.6 => 1.4.6
    dotenv: ^16.4.5 => 16.4.5
    emoji-233333: ^0.3.2 => 0.3.2
    eslint: ^8.57.0 => 8.57.0
    eslint-config-prettier: ^9.1.0 => 9.1.0
    eslint-plugin-prettier: ^5.1.3 => 5.1.3
    eslint-plugin-vue: ^9.26.0 => 9.27.0
    express: ^4.19.2 => 4.19.2
    fast-xml-parser: ^4.4.0 => 4.4.0
    fontmin: ^1.0.1 => 1.1.0
    fs-extra: ^11.2.0 => 11.2.0
    geojson: ^0.5.0 => 0.5.0
    highlight.js: ^11.9.0 => 11.9.0
    html-to-image: ^1.11.11 => 1.11.11
    http-proxy: ^1.18.1 => 1.18.1
    intersection-observer: ^0.12.2 => 0.12.2
    js-cookie: ^3.0.5 => 3.0.5
    lodash-es: ^4.17.21 => 4.17.21
    lozad: ^1.16.0 => 1.16.0
    lru-cache: ^10.2.2 => 10.3.0
    mapbox-gl: ^3.3.0 => 3.4.0
    marked: ^12.0.2 => 12.0.2
    marked-highlight: ^2.1.1 => 2.1.3
    marked-mangle: ^1.1.7 => 1.1.8
    marked-xhtml: ^1.0.9 => 1.0.10
    pinia: ^2.1.7 => 2.1.7
    prettier: ^3.2.5 => 3.3.2
    qrcode: ^1.5.3 => 1.5.3
    qs: ^6.12.1 => 6.12.2
    redis: ^4.6.14 => 4.6.15
    rss: ^1.2.2 => 1.2.2
    sass: ^1.77.2 => 1.77.6
    serialize-javascript: ^6.0.2 => 6.0.2
    sitemap: ^7.1.1 => 7.1.2
    sticky-events: ^3.4.12 => 3.4.12
    swiper: ^11.1.3 => 11.1.4
    tsx: ^4.10.5 => 4.16.0
    typescript: ^5.4.5 => 5.5.3
    ua-parser-js: ^1.0.37 => 1.0.38
    vite: ^5.2.11 => 5.3.2
    vue: ^3.4.27 => 3.4.31
    vue-router: ^4.3.2 => 4.4.0
    wonderful-bing-wallpaper: ^0.3.4 => 0.3.4
    yargs: ^17.7.2 => 17.7.2

Used Package Manager

pnpm

Validations

  • Read the the documentation in detail.
  • Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions