Skip to content

Commit

Permalink
fix(core): ensure the error has message before reading indexOf #27078
Browse files Browse the repository at this point in the history
  • Loading branch information
Coly010 committed Aug 14, 2024
1 parent 6d83ae2 commit ccb7e36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nx/src/project-graph/project-graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ export async function createProjectGraphAndSourceMapsAsync(
);
return projectGraphAndSourceMaps;
} catch (e) {
if (e.message.indexOf('inotify_add_watch') > -1) {
if (e.message && e.message.indexOf('inotify_add_watch') > -1) {
// common errors with the daemon due to OS settings (cannot watch all the files available)
output.note({
title: `Unable to start Nx Daemon due to the limited amount of inotify watches, continuing without the daemon.`,
Expand Down

0 comments on commit ccb7e36

Please sign in to comment.