Issues with running dev server and npm installation failure in Vue 3 setup

I’m trying to initialize a new Vue 3 application, but when executing npm run start, the URL for vite --server doesn’t show up. Additionally, I encountered some problems during the npm package installation. What steps can I take to troubleshoot this issue?

Here’s the output from my terminal during the installation process:

PS C:\myProject\vue3_example> npm run start

> [email protected] start
> vite --server

PS C:\myProject\vue3_example> npm install
npm warn cleanup Failed to remove certain directories [
npm warn cleanup   [
npm warn cleanup     '\\?\C:\myProject\vue3_example\node_modules\@vue\compiler-sfc',
npm warn cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\myProject\vue3_example\node_modules\@vue\compiler-sfc\node_modules'] {
npm warn cleanup       errno: -4048,
npm warn cleanup       code: 'EPERM',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: 'C:\myProject\vue3_example\node_modules\@vue\compiler-sfc\node_modules'
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 For more details, see the log at: C:\Users\USER\AppData\Local\npm-cache\_logs\2025-01-08T01_37_41_845Z-debug-0.log
PS C:\myProject\vue3_example> node -v
v22.13.0
PS C:\myProject\vue3_example> npm -v
11.0.0

I appreciate any guidance.

Certainly, one alternative option to check out would be trying a different version of Node.js and npm. The current versions, Node v22.13.0 and npm 11.0.0, might not have full compatibility with Vue 3 or Vite yet as they are quite new. Installing an LTS version either through a package manager or Node Version Manager (nvm) could resolve unexpected issues like the one you’re having. Testing with a stable release might provide better outcomes and resolve any compatibility concerns.

You might want to check if you have admin rights when handling node_modules. Try running PowerShell as admin. Also, delete your node_modules folder and package-lock.json and try npm install again. Permission issues usually need a fresh start sometimes. Hope this helps!