nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.28k stars 2.32k forks source link

Running web or node build or serve commands throws NX ERROR The "path" argument must be of type string. Received undefined #18133

Closed victorbojica closed 1 year ago

victorbojica commented 1 year ago

Current Behavior

Running nx serve <app> or nx build <app> on a react/node app throws the following error: > NX ERROR The "path" argument must be of type string. Received undefined

So far these are the commands that throw the error - there might be other commands, but ahven't checked.

The error message is all the info i have. Adding --verbose doesn't show anything else. Logs also don't show anything else.

This happened after migrating from 15.8.1 to latest version (16.5.2)

Expected Behavior

The commands should run sucessfully.

GitHub Repo

No response

Steps to Reproduce

  1. Have the 16.5.2 NX version
  2. add a node app
  3. run nx build <app>

Nx Report

Node   : 18.16.1
   OS     : darwin-x64
   npm    : 9.5.1

   nx (global)        : 16.5.2
   nx                 : 16.5.2
   @nx/js             : 16.5.2
   @nrwl/js           : 13.4.6
   @nx/jest           : 16.5.2
   @nrwl/jest         : 13.4.6
   @nx/linter         : 16.5.2
   @nrwl/linter       : 13.4.6
   @nx/workspace      : 16.5.2
   @nrwl/workspace    : 13.4.6
   @nx/cypress        : 16.5.2
   @nx/devkit         : 16.5.2
   @nrwl/devkit       : 13.4.6
   @nx/esbuild        : 16.5.2
   @nx/eslint-plugin  : 16.5.2
   @nx/nest           : 16.5.2
   @nx/node           : 16.5.2
   @nx/plugin         : 16.5.2
   @nx/react          : 16.5.2
   @nrwl/react        : 13.4.6
   @nx/storybook      : 16.5.2
   @nrwl/storybook    : 13.4.6
   @nrwl/tao          : 13.4.6
   @nx/web            : 16.5.2
   @nrwl/web          : 13.4.6
   @nx/webpack        : 16.5.2
   typescript         : 5.1.6
   ---------------------------------------
   Community plugins:
   @nrwl/gatsby : 13.4.6
   ---------------------------------------
   The following packages should match the installed version of nx
     - @nrwl/js@13.4.6
     - @nrwl/jest@13.4.6
     - @nrwl/linter@13.4.6
     - @nrwl/workspace@13.4.6
     - @nrwl/devkit@13.4.6
     - @nrwl/react@13.4.6
     - @nrwl/storybook@13.4.6
     - @nrwl/tao@13.4.6
     - @nrwl/web@13.4.6

   To fix this, run `nx migrate nx@16.5.2`

Failure Logs

No response

Operating System

Additional Information

Package.json dependencies:

{
  "dependencies": {
    "@aws-sdk/client-s3": "^3.370.0",
    "@aws-sdk/cloudfront-signer": "^3.363.0",
    "@aws-sdk/credential-providers": "^3.370.0",
    "@casl/ability": "^6.5.0",
    "@casl/react": "^3.1.0",
    "@faker-js/faker": "^8.0.2",
    "@golevelup/ts-jest": "^0.3.8",
    "@hookform/resolvers": "^3.1.1",
    "@linear/sdk": "^6.0.0",
    "@mdx-js/react": "^2.3.0",
    "@nestjs/bull": "^10.0.1",
    "@nestjs/common": "10.0.5",
    "@nestjs/config": "^3.0.0",
    "@nestjs/core": "10.0.5",
    "@nestjs/devtools-integration": "^0.1.5",
    "@nestjs/passport": "^10.0.0",
    "@nestjs/platform-express": "10.0.5",
    "@nestjs/sequelize": "^10.0.0",
    "@nivo/bar": "^0.83.0",
    "@nivo/core": "^0.83.0",
    "@nivo/line": "^0.83.0",
    "@nivo/pie": "^0.83.0",
    "@radix-ui/react-dialog": "^1.0.4",
    "@radix-ui/react-dropdown-menu": "^2.0.5",
    "@radix-ui/react-slot": "^1.0.2",
    "@radix-ui/react-tooltip": "^1.0.6",
    "@reduxjs/toolkit": "1.9.5",
    "@remirror/pm": "^2.0.6",
    "@remirror/react": "^2.0.34",
    "@sentry/react": "^7.58.1",
    "@sentry/tracing": "^7.58.1",
    "@supercharge/promise-pool": "^3.0.0",
    "@ts-rest/core": "^3.27.0-rc.0",
    "@ts-rest/nest": "^3.27.0-rc.0",
    "@zlooun/exceljs": "^1.0.3",
    "adm-zip": "^0.5.10",
    "algoliasearch": "^4.18.0",
    "aws-sdk": "^2.1415.0",
    "axios": "^1.4.0",
    "bcrypt-nodejs": "^0.0.3",
    "body-parser": "^1.20.2",
    "bull": "^4.10.4",
    "byline": "^5.0.0",
    "class-transformer": "^0.5.1",
    "class-validator": "^0.14.0",
    "cookie-parser": "^1.4.6",
    "core-js": "^3.31.1",
    "cron": "^2.3.1",
    "date-fns": "^2.30.0",
    "date-fns-tz": "^2.0.0",
    "dotenv": "^16.3.1",
    "downshift": "^6.1.10",
    "eventemitter2": "^6.4.9",
    "express": "^4.18.2",
    "express-fileupload": "^1.4.0",
    "file-saver": "^2.0.5",
    "gatsby": "^4.23.0",
    "gatsby-plugin-algolia": "^0.26.0",
    "gatsby-plugin-image": "^2.23.0",
    "gatsby-plugin-manifest": "^4.23.0",
    "gatsby-plugin-mdx": "^4.2.0",
    "gatsby-plugin-offline": "^5.23.0",
    "gatsby-plugin-postcss": "^5.23.0",
    "gatsby-plugin-root-import": "^2.0.8",
    "gatsby-plugin-s3": "^0.3.8",
    "gatsby-plugin-sharp": "^4.23.0",
    "gatsby-plugin-svgr": "^3.0.0-beta.0",
    "gatsby-plugin-typescript": "^4.23.0",
    "gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.27",
    "gatsby-remark-autolink-headers": "^5.23.0",
    "gatsby-remark-copy-linked-files": "^5.23.0",
    "gatsby-remark-images": "^6.23.0",
    "gatsby-remark-markmap": "^0.5.0",
    "gatsby-remark-mermaid": "^2.1.0",
    "gatsby-source-filesystem": "^4.23.0",
    "gatsby-transformer-remark": "^5.23.0",
    "gatsby-transformer-sharp": "^4.23.0",
    "history": "^5.3.0",
    "hotkeys-js": "^3.11.2",
    "html-minifier": "^4.0.0",
    "html-to-text": "^9.0.5",
    "i18next": "^23.2.11",
    "i18next-browser-languagedetector": "^7.1.0",
    "immer": "^10.0.2",
    "ip-range-check": "^0.2.0",
    "json2csv": "^5.0.7",
    "jsonwebtoken": "^9.0.1",
    "jwt-decode": "^3.1.2",
    "ldapjs": "^2.3.3",
    "lodash": "^4.17.21",
    "lz-string": "^1.5.0",
    "match-sorter": "^6.3.1",
    "mime-types": "^2.1.35",
    "mjml": "^4.14.1",
    "mmmagic": "^0.5.3",
    "moment": "^2.29.4",
    "moment-timezone": "^0.5.43",
    "mustache": "^4.2.0",
    "neat-csv": "^6.0.1",
    "nest-aws-sdk": "^3.0.1",
    "nestjs-pino": "^3.3.0",
    "nestjs-sqs": "^1.3.0",
    "newrelic": "^10.4.2",
    "nl-react-dropdown-tree-select": "^2.8.1",
    "node-html-parser": "^6.1.5",
    "nylas": "^6.10.0",
    "object-scan": "^17.1.0",
    "passport": "^0.6.0",
    "passport-azure-ad": "^4.3.5",
    "passport-google-oauth20": "^2.0.0",
    "passport-jwt": "^4.0.1",
    "passport-oauth2": "^1.7.0",
    "path": "^0.12.7",
    "pdfkit": "^0.13.0",
    "pg": "^8.11.1",
    "pg-query-stream": "^4.5.1",
    "pino": "^8.14.1",
    "pino-http": "^8.3.3",
    "pm2": "^5.3.0",
    "posthog-js": "^1.71.0",
    "puppeteer": "^17.1.3",
    "query-string": "^7.1.1",
    "rate-limiter-flexible": "^2.4.1",
    "react": "18.2.0",
    "react-countdown-circle-timer": "^3.2.1",
    "react-datepicker": "^4.16.0",
    "react-dnd": "^16.0.1",
    "react-dnd-html5-backend": "^16.0.1",
    "react-dom": "18.2.0",
    "react-grid-layout": "^1.3.4",
    "react-hook-form": "^7.45.1",
    "react-i18next": "^13.0.2",
    "react-pdf": "^7.1.2",
    "react-player": "^2.12.0",
    "react-redux": "8.1.1",
    "react-router-dom": "6.14.1",
    "react-table": "^7.8.0",
    "react-to-print": "^2.14.13",
    "reading-time-estimator": "^1.8.1",
    "redis": "^3.1.2",
    "redux": "^4.2.1",
    "reflect-metadata": "^0.1.13",
    "refractor": "^4.8.1",
    "regenerator-runtime": "0.13.11",
    "remark-gfm": "^1.0.0",
    "remirror": "^2.0.33",
    "rxjs": "~7.8.1",
    "sanitize-filename": "^1.6.3",
    "sanitize-html": "^2.11.0",
    "sequelize": "^6.32.1",
    "sequelize-typescript": "^2.1.5",
    "sqs-consumer": "^5.7.0",
    "store": "^2.0.12",
    "stream-chain": "^2.2.5",
    "tiny-emitter": "^2.1.0",
    "umzug": "^2.3.0",
    "underscore": "^1.13.6",
    "uuid": "^9.0.0",
    "xml2js": "^0.6.0",
    "yup": "^1.2.0",
    "zod": "^3.21.4"
  },
  "devDependencies": {
    "@commitlint/cli": "^11.0.0",
    "@commitlint/config-conventional": "^11.0.0",
    "@nestjs/schematics": "10.0.1",
    "@nestjs/testing": "10.0.5",
    "@newrelic/webpack-plugin": "^0.4.2",
    "@nrwl/gatsby": "13.4.6",
    "@nx/cypress": "16.5.2",
    "@nx/devkit": "16.5.2",
    "@nx/esbuild": "16.5.2",
    "@nx/eslint-plugin": "16.5.2",
    "@nx/jest": "16.5.2",
    "@nx/js": "16.5.2",
    "@nx/linter": "16.5.2",
    "@nx/react": "16.5.2",
    "@nx/storybook": "16.5.2",
    "@nx/web": "16.5.2",
    "@nx/webpack": "16.5.2",
    "@nx/workspace": "16.5.2",
    "@oclif/command": "^1.8.16",
    "@oclif/config": "^1.17.1",
    "@oclif/plugin-help": "^3.2.20",
    "@playwright/test": "^1.30.0",
    "@schematics/angular": "~15.1.0",
    "@semantic-release/changelog": "^5.0.1",
    "@semantic-release/commit-analyzer": "^8.0.1",
    "@semantic-release/git": "^9.0.1",
    "@semantic-release/gitlab": "^6.0.9",
    "@semantic-release/npm": "^7.0.10",
    "@semantic-release/release-notes-generator": "^9.0.3",
    "@storybook/addon-essentials": "7.0.27",
    "@storybook/addon-interactions": "^7.0.27",
    "@storybook/addon-mdx-gfm": "^7.0.27",
    "@storybook/core-server": "7.0.27",
    "@storybook/jest": "^0.1.0",
    "@storybook/react": "7.0.27",
    "@storybook/react-webpack5": "^7.0.27",
    "@storybook/testing-library": "^0.2.0",
    "@svgr/webpack": "8.0.1",
    "@testing-library/jest-dom": "^5.14.1",
    "@testing-library/react": "13.4.0",
    "@trivago/prettier-plugin-sort-imports": "^4.1.1",
    "@types/adm-zip": "^0.5.0",
    "@types/aws-lambda": "^8.10.93",
    "@types/bull": "^3.15.9",
    "@types/html-to-text": "^9.0.0",
    "@types/jest": "29.4.0",
    "@types/ldapjs": "^1.0.11",
    "@types/mjml": "^4.7.0",
    "@types/mustache": "^4.1.2",
    "@types/node": "18.7.1",
    "@types/passport": "^1.0.7",
    "@types/passport-azure-ad": "^4.0.8",
    "@types/passport-google-oauth20": "^2.0.11",
    "@types/passport-http-bearer": "^1.0.37",
    "@types/passport-jwt": "^3.0.8",
    "@types/pg": "^8.6.5",
    "@types/react": "18.2.14",
    "@types/react-dom": "18.2.6",
    "@types/react-table": "^7.7.9",
    "@types/sanitize-html": "^2.3.2",
    "@types/store": "^2.0.2",
    "@types/umzug": "^2.3.3",
    "@types/underscore": "^1.10.24",
    "@types/uuid": "^8.3.4",
    "@types/webpack": "4.41.32",
    "@typescript-eslint/eslint-plugin": "5.62.0",
    "@typescript-eslint/parser": "5.62.0",
    "babel-jest": "29.4.3",
    "babel-loader": "8.1.0",
    "babel-plugin-module-resolver": "4.0.0",
    "babel-plugin-transform-class-properties": "^6.24.1",
    "babel-preset-gatsby": "2.2.0",
    "chokidar": "3.3.1",
    "chromatic": "^5.9.2",
    "commander": "^9.4.1",
    "commitizen": "^4.2.4",
    "core-js": "^3.8.0",
    "cypress": "12.17.1",
    "cz-conventional-changelog": "^3.3.0",
    "dotenv-cli": "^4.0.0",
    "esbuild": "0.17.17",
    "eslint": "8.15.0",
    "eslint-config-airbnb-base": "^15.0.0",
    "eslint-config-next": "12.3.1",
    "eslint-config-prettier": "8.1.0",
    "eslint-plugin-cypress": "^2.10.3",
    "eslint-plugin-import": "2.26.0",
    "eslint-plugin-jsx-a11y": "6.6.1",
    "eslint-plugin-more-naming-conventions": "^1.0.1",
    "eslint-plugin-react": "7.31.11",
    "eslint-plugin-react-hooks": "4.6.0",
    "eslint-plugin-storybook": "^0.6.12",
    "execa": "^1.0.0",
    "file-loader": "^6.1.1",
    "fs-extra": "8.1.0",
    "gatsby-plugin-sass": "^5.2.0",
    "generate-package-json-webpack-plugin": "^2.3.0",
    "husky": "^4.3.8",
    "inquirer": "^9.1.4",
    "jest": "29.4.3",
    "jest-environment-jsdom": "29.4.3",
    "loader-utils": "^2.0.2",
    "mutationobserver-shim": "^0.3.7",
    "node-env-run": "^3.0.2",
    "node-jq": "^1.12.0",
    "node-ssh": "^11.1.1",
    "nx": "16.5.2",
    "pegjs-loader": "^0.5.6",
    "pino-pretty": "^9.1.0",
    "postcss": "8.4.19",
    "prettier": "2.8.8",
    "prettier-plugin-pegjs": "^0.3.2",
    "sass": "1.41.1",
    "schema-utils": "^3.0.0",
    "semantic-release": "^17.2.4",
    "sequelize-cli": "^5.5.1",
    "sql-webpack-loader": "^0.1.3",
    "storybook": "^7.0.27",
    "storybook-addon-designs": "^6.3.1",
    "ts-jest": "29.1.1",
    "ts-loader": "^8.2.0",
    "ts-morph": "^18.0.0",
    "ts-node": "10.9.1",
    "tslib": "^2.3.1",
    "tslint": "6.1.3",
    "typescript": "5.1.6",
    "unrequired": "^0.3.1",
    "url-loader": "^3.0.0",
    "webpack": "5.88.1",
    "webpack-bundle-analyzer": "^4.5.0",
    "@nx/plugin": "16.5.2",
    "@nx/nest": "16.5.2",
    "@nx/node": "16.5.2"
  }
}
victorbojica commented 1 year ago

Solved. The issue was happening because of @nrwl/gatsby. After chainging and updating to latest version of @nx/gatsby the issue has been fixed.

github-actions[bot] commented 1 year ago

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.