nrwl / nx-console

Nx Console is the user interface for Nx & Lerna.
https://nx.dev
MIT License
1.31k stars 210 forks source link

Nx console Plugin not working in WSL #1657

Closed Mohanrau closed 1 year ago

Mohanrau commented 1 year ago

Current Behavior

  1. Any nx command from NX Console plugin throws
Error running 'shared-one-address:lint': Cannot run program "\home\mohan\PROJECTS\ONE-PORTAL-UI\node_modules\.bin\nx" (in directory "\\wsl$\Ubuntu-20.04\home\mohan\PROJECTS\ONE-PORTAL-UI"): CreateProcess error=2, The system cannot find the file specified

01

  1. Any command from Nx Generate (Ui) shows
This command has no flags to set

02

Expected Behavior

Steps to Reproduce

Failure Logs / Images / Videos

Environment

nx: 15.8.5 Package.json

"dependencies": {
    "@emotion/react": "11.10.6",
    "@emotion/styled": "11.10.6",
    "@fontsource/material-icons": "^4.5.4",
    "@fontsource/roboto": "^4.5.8",
    "@mui/icons-material": "^5.11.0",
    "@mui/lab": "^5.0.0-alpha.120",
    "@mui/material": "^5.9.1",
    "@reduxjs/toolkit": "^1.6.1",
    "@tanstack/react-query": "^4.28.0",
    "@types/lodash": "^4.14.191",
    "@wordpress/element": "^5.3.0",
    "@wordpress/i18n": "^4.26.0",
    "apexcharts": "^3.37.1",
    "axios": "0.27.2",
    "chalk": "^4.1.2",
    "chroma-js": "^2.4.2",
    "core-js": "^3.6.5",
    "date-fns": "^2.29.3",
    "lodash": "^4.17.21",
    "nprogress": "^0.2.0",
    "prop-types": "15.8.1",
    "random-number": "^0.0.9",
    "react": "18.2.0",
    "react-apexcharts": "^1.4.0",
    "react-device-detect": "^2.2.2",
    "react-dom": "18.2.0",
    "react-is": "18.2.0",
    "react-lazy-load-image-component": "^1.5.6",
    "react-redux": "^7.2.5",
    "react-router-dom": "6.4.3",
    "react-slick": "0.29.0",
    "react-to-webcomponent": "^1.7.2",
    "redux": "^4.2.0",
    "regenerator-runtime": "0.13.7",
    "slick-carousel": "latest",
    "styled-components": "5.3.6",
    "tslib": "^2.3.0",
    "tss-react": "^4.8.2",
    "typeface-open-sans": "^1.1.13",
    "validate.js": "^0.13.1",
    "wait-on": "^7.0.1"
  },
  "devDependencies": {
    "@babel/core": "7.21.0",
    "@babel/plugin-proposal-private-methods": "^7.18.6",
    "@babel/plugin-proposal-private-property-in-object": "^7.20.5",
    "@babel/preset-react": "^7.14.5",
    "@babel/preset-typescript": "7.12.13",
    "@emotion/babel-plugin": "11.10.6",
    "@nrwl/cli": "15.8.5",
    "@nrwl/cypress": "15.8.5",
    "@nrwl/devkit": "15.8.5",
    "@nrwl/eslint-plugin-nx": "15.8.5",
    "@nrwl/jest": "15.8.5",
    "@nrwl/js": "15.8.5",
    "@nrwl/linter": "15.8.5",
    "@nrwl/nx-cloud": "15.1.1",
    "@nrwl/react": "15.8.5",
    "@nrwl/storybook": "15.8.5",
    "@nrwl/web": "15.8.5",
    "@nrwl/webpack": "15.8.5",
    "@nrwl/workspace": "15.8.5",
    "@one-wordpress-addons/elementor-widget-react": "latest",
    "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
    "@rollup/plugin-url": "^7.0.0",
    "@storybook/addon-essentials": "6.5.15",
    "@storybook/builder-webpack5": "6.5.15",
    "@storybook/core-server": "6.5.15",
    "@storybook/manager-webpack5": "6.5.15",
    "@storybook/react": "6.5.15",
    "@storybook/test-runner": "^0.7.2",
    "@svgr/rollup": "^6.1.2",
    "@svgr/webpack": "^6.1.2",
    "@testing-library/jest-dom": "^5.16.5",
    "@testing-library/react": "14.0.0",
    "@trivago/prettier-plugin-sort-imports": "^4.0.0",
    "@types/chroma-js": "^2.1.5",
    "@types/jest": "29.4.0",
    "@types/node": "18.14.2",
    "@types/nprogress": "^0.2.0",
    "@types/random-number": "^0.0.1",
    "@types/react": "18.0.28",
    "@types/react-dom": "18.0.11",
    "@types/react-is": "17.0.3",
    "@types/react-lazy-load-image-component": "^1.5.2",
    "@types/react-router-dom": "^5.3.3",
    "@types/react-slick": "^0.23.10",
    "@types/styled-components": "^5.1.26",
    "@typescript-eslint/eslint-plugin": "^5.44.0",
    "@typescript-eslint/parser": "^5.44.0",
    "@wordpress/env": "~5.14.0",
    "@wordpress/scripts": "^25.3.0",
    "babel-jest": "29.4.3",
    "babel-loader": "9.1.2",
    "babel-plugin-styled-components": "^2.0.7",
    "concurrently": "^7.6.0",
    "cross-env": "^7.0.3",
    "css-loader": "^6.7.3",
    "cypress": "^12.2.0",
    "eslint": "~8.15.0",
    "eslint-config-prettier": "8.1.0",
    "eslint-plugin-cypress": "^2.10.3",
    "eslint-plugin-import": "2.27.5",
    "eslint-plugin-jsx-a11y": "6.7.1",
    "eslint-plugin-react": "7.32.2",
    "eslint-plugin-react-hooks": "4.6.0",
    "file-loader": "^6.2.0",
    "html-webpack-plugin": "^5.5.0",
    "jest": "29.4.3",
    "jest-environment-jsdom": "29.4.3",
    "node-sass": "^7.0.3",
    "npm-run-all": "^4.1.5",
    "nx": "15.8.5",
    "postcss-loader": "^7.0.2",
    "prettier": "^2.8.3",
    "react-refresh": "^0.10.0",
    "react-test-renderer": "18.2.0",
    "style-loader": "^3.3.1",
    "stylus": "^0.55.0",
    "stylus-loader": "^7.1.0",
    "to-string-loader": "^1.2.0",
    "ts-jest": "29.0.5",
    "ts-node": "10.9.1",
    "typescript": "4.9.5",
    "url-loader": "^4.1.1",
    "webpack": "^5.75.0",
    "webpack-merge": "^5.8.0"
  }
Cammisuli commented 1 year ago

We just released 1.3.0 that includes proper support for WSL. Give it a shot, and let me know if it worked out (or not 😦) for you πŸ™‚

Mohanrau commented 1 year ago

We just released 1.3.0 that includes proper support for WSL. Give it a shot, and let me know if it worked out (or not 😦) for you πŸ™‚

Hi @Cammisuli this was tested on v1.3.0 😦

Cammisuli commented 1 year ago

Oh no, sorry I missed the version number. I literally just tested it with wsl and it worked out for me.

Cammisuli commented 1 year ago

Can you show me your WSL settings in the Intellij dialog?

Mohanrau commented 1 year ago

03

Cammisuli commented 1 year ago

Sorry, the WSL settings under Languages & Frameworks > Node.js. Like this: image

Mohanrau commented 1 year ago

Sorry, the WSL settings under Languages & Frameworks > Node.js. Like this: image

i just checked it was pointing to windows node version after change to wsl 1st issue fixed but 2nd issue still persist

Cammisuli commented 1 year ago

can you restart the editor and see if it still persists?

Mohanrau commented 1 year ago

cool now working man. Thank you for u time.

Cammisuli commented 1 year ago

Thanks for confirming as well πŸ™‚ . I'm going to update the readme to make sure it has more information on how to configure the node interpreter to get Nx Console to work properly.