NX Cannot read properties of undefined (reading 'externalNodes') when running nx run-ios mobile
See original GitHub issueI am running nx run-ios mobile
for react-native project and I am getting an error
Current Behavior
The execution fails with the following error:
> NX Cannot read properties of undefined (reading 'externalNodes')
Expected Behavior
The execution completes successfully
Steps to Reproduce
npx nx g @nrwl/react-native:app mobile
- `nx run-ios mobile
Failure Logs
TypeError: Cannot read properties of undefined (reading 'externalNodes')
at findAllNpmDependencies (/Users/nx/dev/mobile/node_modules/@nrwl/react-native/src/utils/find-all-npm-dependencies.js:11:24)
at /Users/nx/dev/mobile/node_modules/@nrwl/react-native/src/executors/sync-deps/sync-deps.impl.js:23:78
at Generator.next (<anonymous>)
at /Users/nx/dev/mobile/node_modules/tslib/tslib.js:118:75
at new Promise (<anonymous>)
at Object.__awaiter (/Users/nx/dev/mobile/node_modules/tslib/tslib.js:114:16)
at syncDeps (/Users/nx/dev/mobile/node_modules/@nrwl/react-native/src/executors/sync-deps/sync-deps.impl.js:22:20)
at runIosExecutor_1 (/Users/nx/dev/mobile/node_modules/@nrwl/react-native/src/executors/run-ios/run-ios.impl.js:20:137)
at runIosExecutor_1.next (<anonymous>)
at resume (/Users/nx/dev/mobile/node_modules/tslib/tslib.js:230:48)
Environment
> NX Report complete - copy this into the issue template
Node : 17.1.0
OS : darwin x64
yarn : 1.22.15
nx : 14.5.4
@nrwl/angular : Not Found
@nrwl/cypress : 14.5.4
@nrwl/detox : 14.5.4
@nrwl/devkit : 14.5.4
@nrwl/eslint-plugin-nx : 14.5.4
@nrwl/express : Not Found
@nrwl/jest : 14.5.4
@nrwl/js : 14.5.8
@nrwl/linter : 14.5.4
@nrwl/nest : 14.5.8
@nrwl/next : Not Found
@nrwl/node : 14.5.4
@nrwl/nx-cloud : 14.4.1
@nrwl/nx-plugin : Not Found
@nrwl/react : 14.5.8
@nrwl/react-native : 14.5.8
@nrwl/schematics : Not Found
@nrwl/storybook : 14.5.8
@nrwl/web : 14.5.4
@nrwl/workspace : 14.5.4
typescript : 4.7.4
---------------------------------------
Community plugins:
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
NX Cannot read properties of undefined (reading 'endsWith')
NX Failed to run update-ngcc-postinstall from @nrwl/angular. This workspace is NOT up to date! NX rule is not a function. So I set...
Read more >nx cannot read properties of undefined (reading 'endswith')
I have nx 14.4.3 version in my system. And when I run nx serve it gives me the error :- TypeError: Cannot read...
Read more >Getting Started with Monorepo with Nx Nrwl - Rupesh Tiwari
Create Monorepo using Nx with angular projects and applications. ... Creating JS project using NX Console; How to create Run Command in NX...
Read more >Pulse · nrwl/nx · GitHub
Contribute to nrwl/nx development by creating an account on GitHub. ... Error when running affected: Cannot read properties of undefined (reading 'name').
Read more >Get Cannot read properties of undefined (reading 'type') from ...
Hi,When I build, I got following message. I use Angular 13.3 and typescript 4.6.2. Is there a way to remove these message?
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Migrating works
Hey @Celleb, it may be unrelated, but some of your @nrwl/* packages don’t line up with the version of
nx
you have installed. Aside from@nrwl/nx-cloud
, all packages under the nrwl scope should generally be set up with the same version.Can you correct this and check that the issue still reproduces? An easy way to fix this would be to run
nx migrate {v}
, wherev
is the version of nx you have installed. Alternatively, updating to latest withnx migrate latest
would also work.