react-nativeexponrwl-nxnx-workspace

nrwl/expo - The "path" argument must be of type string. Received undefined


I added a expo project to my nx workspace (which contains a react app and some libraries) by executing nx generate @nrwl/expo:app my-app. But when I try to run the app via npx nx run my-app:start I get the following error:

NX ERROR The "path" argument must be of type string. Received undefined

I changed nothing in the project. I just wanted to make sure the project is working after the init. Basically I followed this introduction: Introducing Expo Support for NX

What "path" argument are we talking about here? I just see two in the tsconfig.json file:

{
  "extends": "../../tsconfig.base.json",
  "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "jsx": "react-native",
    "lib": ["dom", "esnext"],
    "moduleResolution": "node",
    "noEmit": true,
    "skipLibCheck": true,
    "resolveJsonModule": true,
    "strict": true
  },
  "files": ["../../node_modules/@nrwl/expo/typings/svg.d.ts"],
  "include": [],
  "references": [
    {
      "path": "./tsconfig.app.json"
    },
    {
      "path": "./tsconfig.spec.json"
    }
  ],
  "exclude": ["node_modules"]
}

Workspace information

"dependencies": {
    "@expo/metro-config": "0.3.22",
    "@reduxjs/toolkit": "1.6.2",
    "@types/object-hash": "^2.2.1",
    "@types/react-loadable": "^5.5.6",
    "antd": "^4.18.2",
    "array-move": "^4.0.0",
    "axios": "^0.24.0",
    "core-js": "^3.6.5",
    "dompurify": "^2.3.6",
    "expo": "46.0.10",
    "expo-splash-screen": "~0.16.2",
    "expo-status-bar": "~1.4.0",
    "html-react-parser": "^1.4.8",
    "i18next": "^21.6.5",
    "lodash": "^4.17.21",
    "object-hash": "^3.0.0",
    "react": "17.0.2",
    "react-dom": "17.0.2",
    "react-grid-layout": "^1.3.1",
    "react-i18next": "^11.15.3",
    "react-icons": "^4.3.1",
    "react-loadable": "^5.5.0",
    "react-native": "0.69.5",
    "react-native-svg": "12.3.0",
    "react-native-svg-transformer": "1.0.0",
    "react-native-web": "~0.18.7",
    "react-qr-code": "^2.0.7",
    "react-quill": "^2.0.0",
    "react-redux": "7.2.5",
    "react-router-dom": "^6.2.1",
    "redux-persist": "^6.0.0",
    "regenerator-runtime": "0.13.7",
    "tslib": "^2.0.0"
  },
  "devDependencies": {
    "@nrwl/cli": "13.4.1",
    "@nrwl/cypress": "13.4.1",
    "@nrwl/detox": "14.8.3",
    "@nrwl/eslint-plugin-nx": "13.4.1",
    "@nrwl/expo": "^14.8.3",
    "@nrwl/jest": "13.4.1",
    "@nrwl/linter": "13.4.1",
    "@nrwl/react": "13.4.1",
    "@nrwl/tao": "13.4.1",
    "@nrwl/web": "13.4.1",
    "@nrwl/workspace": "13.4.1",
    "@rtk-query/codegen-openapi": "^1.0.0",
    "@svgr/webpack": "^6.3.1",
    "@testing-library/jest-dom": "5.16.5",
    "@testing-library/jest-native": "4.0.11",
    "@testing-library/react": "12.1.2",
    "@testing-library/react-hooks": "7.0.2",
    "@testing-library/react-native": "11.0.0",
    "@types/dompurify": "^2.3.2",
    "@types/jest": "27.0.2",
    "@types/lodash": "^4.14.178",
    "@types/node": "14.14.33",
    "@types/react": "17.0.30",
    "@types/react-dom": "17.0.9",
    "@types/react-grid-layout": "^1.3.0",
    "@types/react-native": "0.69.8",
    "@types/redux-persist": "^4.3.1",
    "@typescript-eslint/eslint-plugin": "~5.3.0",
    "@typescript-eslint/parser": "~5.3.0",
    "babel-jest": "27.2.3",
    "babel-preset-expo": "~9.2.0",
    "cypress": "^9.1.0",
    "detox": "19.12.1",
    "eas-cli": "2.1.0",
    "eslint": "8.2.0",
    "eslint-config-prettier": "8.1.0",
    "eslint-plugin-cypress": "^2.10.3",
    "eslint-plugin-import": "2.25.2",
    "eslint-plugin-jsx-a11y": "6.4.1",
    "eslint-plugin-react": "7.26.1",
    "eslint-plugin-react-hooks": "4.2.0",
    "expo-cli": "6.0.5",
    "jest": "27.2.3",
    "jest-circus": "28.1.1",
    "jest-environment-jsdom": "28.1.1",
    "jest-expo": "46.0.1",
    "metro-resolver": "0.72.2",
    "prettier": "^2.3.1",
    "react-test-renderer": "17.0.2",
    "release-it": "^15.2.0",
    "swagger-cli": "^4.0.4",
    "ts-jest": "27.0.5",
    "ts-node": "10.9.1",
    "typeconv": "^1.8.0",
    "typescript": "~4.4.3"
  }

Node version: 16.13.0

npm version: 8.1.0


Solution

  • I found the problem... Quite simple: I forgot to update all the other nx packages to 14.8.3