Repository: nrwl/nx-console

Issue #1863: Plugin interferes with the deletion of the node_modules
Created: 2023-08-19T15:26:16Z
Current Behavior
It is impossible to fully remove node_modules while in IDE
Expected Behavior
Unfortunately, developers in the npm ecosystem are used to removing the node_modules folder in some cases.
Currently, it is problematic while in IDE because the plugin locks resources in node_modules/@nx/.
Such adds extra overhead on communicating that IDE must be closed in order to do such things, while theoretically can be solved one time on your side.
Steps to Reproduce

npx create-nx-workspace@latest nx1672
idea nx1672 or code nx1672
nx reset (to stop the daemon?)
rm -fo -r node_modules (I'm using powershell)






Failure Logs / Images / Videos
rm -fo -r node_modules
Cannot remove C:\nx1672\node_modules\@nx\.nx-win32-x64-msvc-kycqiCtG\nx.win32-x64-msvc.node: Access to the path 'nx.win32-x64-msvc.node' is denied.

Environment
 >  NX   Report complete - copy this into the issue template

   Node   : 16.14.2
   OS     : win32-x64
   npm    : 9.8.1

   nx (global)        : 16.7.2
   nx                 : 16.7.2
   @nx/js             : 16.7.2
   @nx/jest           : 16.7.2
   @nx/linter         : 16.7.2
   @nx/workspace      : 16.7.2
   @nx/angular        : 16.7.2
   @nx/cypress        : 16.7.2
   @nx/devkit         : 16.7.2
   @nx/eslint-plugin  : 16.7.2
   @nrwl/tao          : 16.7.2
   @nx/webpack        : 16.7.2
   typescript         : 5.1.6



Nx Console: v18.6.0


VSCode: 1.82.0-insider


Nx Console: 1.11.1


IDEA: 2023.2

Duplicate issue #2026: Command `npm ci` not working when IDE is opened
Created: 2024-02-19T12:54:50Z
Current Behavior
When Webstorm is opened, if I run the npm ci command it fails with the error message below. I therefore need to stop the IDE and kill the task 'Node.js JS Runtime' so the npm ci runs correctly.
The other solution is to uninstall the NX Console plugin from Webstorm and then I can run the npm ci with the IDE opened.
Here are the error details from my terminal :

Here is the log I get :
2024-02-19T10_25_54_362Z-debug-0.log
Expected Behavior
I expect to be able to run the npm ci command even if Webstorm is opened with NX Console plugin installed.
Steps to Reproduce

Open Webstorm with NX Console plugin installed
Run npm ci command in a terminal
Then you should get the error I got (see screenshot above)
Close the IDE
Then you should see a 'Node.js JS Runtime' task to pop in your task manager

Environment
Webstorm : 2023.3.4
NX : 17.2.8
NX Console : 1.18.0
"devDependencies": {
    "@angular-devkit/build-angular": "17.0.8",
    "@angular-devkit/core": "17.0.8",
    "@angular-devkit/schematics": "17.0.8",
    "@angular-eslint/builder": "17.1.1",
    "@angular-eslint/eslint-plugin": "17.1.1",
    "@angular-eslint/eslint-plugin-template": "17.1.1",
    "@angular-eslint/schematics": "17.1.1",
    "@angular-eslint/template-parser": "17.1.1",
    "@angular/cli": "~17.0.8",
    "@angular/compiler-cli": "17.0.8",
    "@angular/language-service": "17.0.8",
    "@hirez_io/observer-spy": "^2.2.0",
    "@lucca/proxy": "^4.3.0",
    "@ngneat/spectator": "16.0.0",
    "@nx/angular": "17.2.8",
    "@nx/eslint": "17.2.8",
    "@nx/eslint-plugin": "17.2.8",
    "@nx/jest": "17.2.8",
    "@nx/js": "17.2.8",
    "@nx/workspace": "17.2.8",
    "@schematics/angular": "17.0.8",
    "@swc-node/register": "~1.6.8",
    "@swc/core": "~1.3.107",
    "@types/eslint": "^8.56.2",
    "@types/jest": "^29.5.12",
    "@types/node": "18.16.9",
    "@typescript-eslint/eslint-plugin": "^6.17.0",
    "@typescript-eslint/parser": "^6.17.0",
    "@typescript-eslint/utils": "^6.17.0",
    "eslint": "^8.56.0",
    "eslint-config-prettier": "9.0.0",
    "eslint-import-resolver-typescript": "^3.6.1",
    "eslint-plugin-import": "^2.29.1",
    "eslint-plugin-prefer-arrow": "^1.2.3",
    "eslint-plugin-prettier": "^5.1.3",
    "husky": "^8.0.3",
    "jest": "^29.7.0",
    "jest-environment-jsdom": "^29.7.0",
    "jest-preset-angular": "13.1.6",
    "jsonc-eslint-parser": "^2.4.0",
    "lint-staged": "^15.2.2",
    "ng-mocks": "^14.12.1",
    "nx": "17.2.8",
    "prettier": "^3.1.1",
    "stylelint": "^14.16.1",
    "stylelint-config-prettier": "^9.0.5",
    "stylelint-prettier": "^2.0.0",
    "ts-jest": "^29.1.2",
    "ts-mockito": "^2.6.1",
    "ts-node": "^10.9.2",
    "typescript": "5.2.2",
    "webpack-bundle-analyzer": "^4.10.1"
  },

Closing comment (2024-02-26T11:46:25Z): This is a known issue and I will implement a solution in nx core soon. For now you can run npx nx reset or npx nx daemon --stop as a workaround.
Closing as duplicate of #1863