Repository: vscode
Issue: Packing of terminal-suggest fails on 'fs/promises' while building from source
Labels: bug,terminal-suggest

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes/No

No, this is a build issue.

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: main branch
- OS Version: Windows and Ubunuto
- Node Version: 22

Steps to Reproduce:

1. clone repository
2. run `npm run watch-web` or `npm run watch`

```
 npm run watch-web

> code-oss-dev@1.97.0 watch-web
> node ./node_modules/gulp/bin/gulp.js watch-web

(node:8081) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[13:39:23] Using gulpfile /mnt/c/Users/xxxx/Documents/Repos/vscode/gulpfile.js
[13:39:23] Starting 'watch-web'...
[13:41:39] Finished packaging web extension configuration-editing with 0 errors.
[13:41:39] Finished packaging web extension css-language-features/client with 0 errors.
[13:41:39] Finished packaging web extension css-language-features/server with 0 errors.
[13:41:39] Finished packaging web extension emmet with 0 errors.
[13:41:39] Finished packaging web extension extension-editing with 0 errors.
[13:41:39] Finished packaging web extension git-base with 0 errors.
[13:41:39] Finished packaging web extension github-authentication with 0 errors.
[13:41:39] Finished packaging web extension html-language-features/client with 0 errors.
[13:41:39] Finished packaging web extension html-language-features/server with 0 errors.
[13:41:39] Finished packaging web extension ipynb with 0 errors.
[13:41:39] Finished packaging web extension ipynb with 0 errors.
[13:41:39] Finished packaging web extension json-language-features/client with 0 errors.
[13:41:39] Finished packaging web extension json-language-features/server with 0 errors.
[13:41:39] Finished packaging web extension markdown-language-features with 0 errors.
[13:41:39] Finished packaging web extension markdown-math with 0 errors.
[13:41:39] Finished packaging web extension media-preview with 0 errors.
[13:41:39] Finished packaging web extension merge-conflict with 0 errors.
[13:41:39] Finished packaging web extension microsoft-authentication with 0 errors.
[13:41:39] Finished packaging web extension npm with 0 errors.
[13:41:39] Finished packaging web extension references-view with 0 errors.
[13:41:39] Finished packaging web extension search-result with 0 errors.
[13:41:39] Finished packaging web extension simple-browser with 0 errors.
[13:41:39] Finished packaging web extension terminal-suggest with 1 errors.
[13:41:39] {
  moduleIdentifier: '/mnt/c/Users/xxxx/Documents/Repos/vscode/node_modules/ts-loader/index.js??ruleSet[1].rules[0].use[0]!/mnt/c/Users/xxxx/Documents/Repos/vscode/extensions/mangle-loader.js??ruleSet[1].rules[0].use[1]!/mnt/c/Users/xxxxt/Documents/Repos/vscode/extensions/terminal-suggest/src/terminalSuggestMain.ts',
  moduleName: './src/terminalSuggestMain.ts',
  loc: '50:24-46',
  message: "Module not found: Error: Can't resolve 'fs/promises' in '/mnt/c/Users/xxxx/Documents/Repos/vscode/extensions/terminal-suggest/src'",
  moduleId: 0,
  moduleTrace: [],
  details: "resolve 'fs/promises' in '/mnt/c/Users/xxxx/Documents/Repos/vscode/extensions/terminal-suggest/src'\n" +
    '  Parsed request is a module\n' +
    '  using description file: /mnt/c/Users/xxxx/Documents/Repos/vscode/extensions/terminal-suggest/package.json (relative path: ./src)\n' +
    "    Field 'browser' doesn't contain a valid alias configuration\n" +
    '    resolve as module\n' +
    "      /mnt/c/Users/xxxx/Documents/Repos/vscode/extensions/terminal-suggest/src/node_modules doesn't exist or is not a directory\n" +
    "      /mnt/c/Users/xxxx/Documents/Repos/vscode/extensions/terminal-suggest/node_modules doesn't exist or is not a directory\n" +
    '      looking for modules in /mnt/c/Users/xxxx/Documents/Repos/vscode/extensions/node_modules\n' +
    "        /mnt/c/Users/xxxx/Documents/Repos/vscode/extensions/node_modules/fs doesn't exist\n" +
    '      looking for modules in /mnt/c/Users/xxxx/Documents/Repos/vscode/node_modules\n' +
    "        /mnt/c/Users/xxxx/Documents/Repos/vscode/node_modules/fs doesn't exist\n" +
    "      /mnt/c/Users/xxxx/Documents/Repos/node_modules doesn't exist or is not a directory\n" +
    "      /mnt/c/Users/xxxx/Documents/node_modules doesn't exist or is not a directory\n" +
    '      looking for modules in /mnt/c/Users/xxxx/node_modules\n' +
    "        /mnt/c/Users/xxxx/node_modules/fs doesn't exist\n" +
    "      /mnt/c/Users/node_modules doesn't exist or is not a directory\n" +
    "      /mnt/c/node_modules doesn't exist or is not a directory\n" +
    "      /mnt/node_modules doesn't exist or is not a directory\n" +
    "      /node_modules doesn't exist or is not a directory",
  stack: "ModuleNotFoundError: Module not found: Error: Can't resolve 'fs/promises' in '/mnt/c/Users/xxxx/Documents/Repos/vscode/extensions/terminal-suggest/src'\n" +
    '    at /mnt/c/Users/xxxx/Documents/Repos/vscode/node_modules/webpack/lib/Compilation.js:2109:28\n' +
    '    at /mnt/c/Users/xxxx/Documents/Repos/vscode/node_modules/webpack/lib/NormalModuleFactory.js:908:13\n' +
    '    at eval (eval at create (/mnt/c/Users/xxxx/Documents/Repos/vscode/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:10:1)\n' +
    '    at /mnt/c/Users/xxxx/Documents/Repos/vscode/node_modules/webpack/lib/NormalModuleFactory.js:333:22\n' +
    '    at eval (eval at create (/mnt/c/Users/xxxx/Documents/Repos/vscode/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:9:1)\n' +
    '    at /mnt/c/Users/xxxx/Documents/Repos/vscode/node_modules/webpack/lib/NormalModuleFactory.js:512:22\n' +
    '    at /mnt/c/Users/xxxx/Documents/Repos/vscode/node_modules/webpack/lib/NormalModuleFactory.js:150:10\n' +
    '    at /mnt/c/Users/xxxx/Documents/Repos/vscode/node_modules/webpack/lib/NormalModuleFactory.js:775:25\n' +
    '    at /mnt/c/Users/xxxx/Documents/Repos/vscode/node_modules/webpack/lib/NormalModuleFactory.js:992:8\n' +
    '    at /mnt/c/Users/xxxx/Documents/Repos/vscode/node_modules/webpack/lib/NormalModuleFactory.js:1121:5'
}
[13:41:39] Finished packaging web extension typescript-language-features with 0 errors.
[13:41:39] Finished packaging web extension typescript-language-features with 0 errors.
[13:41:39] Finished packaging web extension vscode-test-resolver with 0 errors.
```