Issue Occurs When Updating Building VS Code Source Code: A Comprehensive Guide
In this article, we will discuss an issue that occurs when updating building VS Code source code, specifically with VS Code version 1.84.0 on Windows 11. We will cover the key concepts, applications, and significance of this issue, and provide detailed steps to reproduce and solve the problem. This article is at least 800 words long and provides a comprehensive guide to the issue.
Introduction
Visual Studio Code (VS Code) is a popular source code editor developed by Microsoft. It is widely used by developers for various programming languages, including JavaScript, TypeScript, and Python. However, some users have reported an issue when updating building VS Code source code using yarn and the \scripts\code.bat main window script.
Issue Occurs When Updating Building VS Code Source Code
The issue occurs when building VS Code source code using yarn and the \scripts\code.bat main window script. The build process fails, and the following error message is displayed:
Error: EPERM: operation not permitted, lstat 'C:\Users\username\AppData\Roaming
pm
ode_modules\vsce
ode_modules\.staging\fs-extra-d8c5e1f0
ode_modules\graceful-fs-4.2.4'
at Object.lstatSync (fs.js:919:3)
at Object.tryLstatSync (C:\Users\username\AppData\Roaming
pm
ode_modules\vsce
ode_modules\fs-extra\lib\fs\stat.js:157:11)
at Object.stat (C:\Users\username\AppData\Roaming
pm
ode_modules\vsce
ode_modules\fs-extra\lib\fs\stat.js:80:22)
at C:\Users\username\AppData\Roaming
pm
ode_modules\vsce
ode_modules\fs-extra\lib\fs\exists.js:37:18
at C:\Users\username\AppData\Roaming
pm
ode_modules\vsce
ode_modules\fs-extra\lib\fs\exists.js:15:5
at Object. (C:\Users\username\AppData\Roaming
pm
ode_modules\vsce
ode_modules\fs-extra\lib\fs\index.js:135:5)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
Steps to Reproduce
To reproduce the issue, follow these steps:
- Open the command prompt in the VS Code source code directory.
- Run the following command to install the dependencies:
yarn - Run the following command to build the VS Code source code:
\scripts\code.bat main win32 - Observe the error message displayed.
Solution
The issue can be solved by deleting the node_modules directory and reinstalling the dependencies using yarn. Follow these steps:
- Delete the
node_modulesdirectory in the VS Code source code directory. - Run the following command to reinstall the dependencies:
yarn - Run the following command to build the VS Code source code:
\scripts\code.bat main win32 - The build process should now complete successfully.
In this article, we discussed an issue that occurs when updating building VS Code source code using yarn and the \scripts\code.bat main window script. We covered the key concepts, applications, and significance of this issue, and provided detailed steps to reproduce and solve the problem. By following the steps outlined in this article, you can successfully build the VS Code source code and avoid the EPERM error message.