vuepress / core

Vue-Powered Static Site Generator
https://vuepress.vuejs.org
MIT License
2.29k stars 926 forks source link

[Bug report] #1424

Closed yusongh closed 11 months ago

yusongh commented 11 months ago

Description

After installing through the following command, a missing webpack error will appear. For specific errors, please see the picture below.

pnpm add -D vuepress@next @vuepress/client@next vue

image

Reproduction

https://stackblitz.com/edit/vuepress-rj8mvn?file=package.json

Used Package Manager

pnpm

System Info

internal/process/esm_loader.js:74
    internalBinding('errors').triggerUncaughtException(
                              ^

Error [ERR_UNKNOWN_BUILTIN_MODULE]: No such built-in module: node:timers/promises
    at new NodeError (internal/errors.js:322:7)
    at Loader.builtinStrategy (internal/modules/esm/translators.js:285:11)
    at new ModuleJob (internal/modules/esm/module_job.js:63:26)
    at Loader.getModuleJob (internal/modules/esm/loader.js:258:11)
    at async ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:78:21)
    at async Promise.all (index 1)
    at async link (internal/modules/esm/module_job.js:83:9) {
  code: 'ERR_UNKNOWN_BUILTIN_MODULE'
}
meteorlxy commented 11 months ago

Weird. sass-loader is set as optional peer dep.

https://github.com/vuepress/vuepress-next/blob/7823c3c0f73b6eb30c93459d2527a860e599d0af/ecosystem/theme-default/package.json#L67-L70

What's your node version and pnpm version? The system info is broken. I think your node version might be lower than v16

github-actions[bot] commented 11 months ago

Hello @yusongh. Please provide a minimal reproduction using a GitHub repository or v2.vuepress.vuejs.org/new. Issues marked with need reproduction will be closed if they have no activity within 7 days.

yusongh commented 11 months ago

Weird. sass-loader is set as optional peer dep.

https://github.com/vuepress/vuepress-next/blob/7823c3c0f73b6eb30c93459d2527a860e599d0af/ecosystem/theme-default/package.json#L67-L70

What's your node version and pnpm version? The system info is broken. I think your node version might be lower than v16

Yes, node version is 14.19.0, pnpm version is 7.33.5

meteorlxy commented 11 months ago

Then please upgrade Node to the latest LTS version (node 18+ for now), and better to upgrade pnpm to the latest version, too.

Node 16 is already EOL. We'll drop node 16 support in next release.

image