Hi
When npm i command is run we are getting below erro
Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'D:\\kartik\\My Data\\dist\\node_modules\\@types',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'D:\kartik\My Data\dist\node_modules\@types'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'D:\\kartik\\My Data\\dist\\node_modules\\@types'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path D:\kartik\My Data\dist\node_modules\nx
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node ./bin/post-install
npm ERR! D:\kartik\My Data\dist\node_modules\nx\src\native\native-bindings.js:244
npm ERR! throw loadError
npm ERR! ^
npm ERR!
npm ERR! Error: The specified module could not be found.
npm ERR! \\?\D:\kartik\My Data\dist\.nx\cache\18.3.5-nx.win32-x64-msvc.node
npm ERR! at Module._extensions..node (node:internal/modules/cjs/loader:1465:18)
npm ERR! at Module.load (node:internal/modules/cjs/loader:1206:32)
npm ERR! at Module._load (node:internal/modules/cjs/loader:1022:12)
npm ERR! at Module._load (D:\kartik\My Data\dist\node_modules\nx\src\native\index.js:64:25)
npm ERR! at Module.require (node:internal/modules/cjs/loader:1231:19)
npm ERR! at require (node:internal/modules/helpers:179:18)
npm ERR! at Object. (D:\kartik\My Data\dist\node_modules\nx\src\native\native-bindings.js:66:29)
npm ERR! at Module._compile (node:internal/modules/cjs/loader:1369:14)
npm ERR! at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
npm ERR! at Module.load (node:internal/modules/cjs/loader:1206:32) {
npm ERR! code: 'ERR_DLOPEN_FAILED'
npm ERR! }
Thnaks
Mrunali SawantPosted Jun 12, 2024, 5:57 AM
Clear NPM Cache: Run
npm cache clean --force.Manually Delete
dist/node_modulesFolderRemove
node_modulesandpackage-lock.jsonCheck File Permissions: Ensure `dist` directory is not read-only.Kill Node Processes: Run `taskkill /f /im node.exe` in Command Prompt.Update npm and Node.js: Run `npm install -g npm@latest` and update Node.js from (https://nodejs.org/).Then, try running `npm i` again.Rajendra TaradalePosted Jun 11, 2024, 2:26 PM
You can try -> deleting package.lock.json, node_modules, and dist folder and clear the cache (npm cache clean --force)
then install all packages again. Also check the current versions