-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
Description
Issue: Error while running npm install after creating a Vite project
Steps to reproduce:
- Run the following command to create a Vite project:
npm create vite@latest-
Choose "React" as the framework.
-
Choose "JavaScript" as the variant.
- Navigate to the project folder and run:
npm installExpected outcome:
- Successful installation of the dependencies.
Actual outcome:
- The following warning and error messages appear:
npm warn cleanup Failed to remove some directories [
npm warn cleanup [
npm warn cleanup '\\\\?\\C:\\Nature\\CODE\\All-in-one\\test\\node_modules',
npm warn cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Nature\CODE\All-in-one\test\node_modules\@babel\core\lib\config'] {
npm warn cleanup errno: -4048,
npm warn cleanup code: 'EPERM',
npm warn cleanup syscall: 'rmdir',
npm warn cleanup path: 'C:\\Nature\\CODE\\All-in-one\\test\\node_modules\\@babel\\core\\lib\\config'
npm warn cleanup }
npm warn cleanup ],
npm warn cleanup [
npm warn cleanup '\\\\?\\C:\\Nature\\CODE\\All-in-one\\test\\node_modules\\@eslint-community',
npm warn cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Nature\CODE\All-in-one\test\node_modules\@eslint-community'] {
npm warn cleanup errno: -4048,
npm warn cleanup code: 'EPERM',
npm warn cleanup syscall: 'rmdir',
npm warn cleanup path: 'C:\\Nature\\CODE\\All-in-one\\test\\node_modules\\@eslint-community'
npm warn cleanup }
npm warn cleanup ]
npm warn cleanup ]
npm error code ERR_INVALID_ARG_TYPE
npm error The "file" argument must be of type string. Received undefined
npm error A complete log of this run can be found in: C:\Users\akash roy\AppData\Local\npm-cache\_logs\2025-04-26T15_09_29_738Z-debug-0.logAdditional Information:
-
I have uninstalled Node.js, deleted all npm and node_modules folders manually, and reinstalled Node.js.
-
Still, the same problem persists.
-
The error seems related to permission issues when trying to remove certain directories.
-
It indicates rmdir operations failing due to EPERM errors.
Has anyone encountered this issue before? Any suggestions for fixing it?
AlttiRi