analog: Nx 16.9.x errors with Cannot read properties of undefined (reading 'executor')

Please provide the environment you discovered this bug in.

Trying to follow the Get Started instructions

Now using node v18.18.0 (npm v9.8.1)
❯ npm create analog@latest
✔ Project name: … analog-start4
✔ Select a template: › Analog
✔ Select a variant: › angular-v16
✔ Would you like to add Tailwind to your project? … no

❯ npm run start

> analog-start4@0.0.0 start
> npm run dev

> analog-start4@0.0.0 dev
> ng serve

An unhandled exception occurred: Cannot read properties of undefined (reading 'executor')
See "/private/var/folders/k9/y9051znd5zbbryyktpbltq940000gn/T/ng-46KxxG/angular-errors.log" for further details.

Which area/package is the issue in?

create-analog

Description

as above

Please provide the exception or error you saw

No response

Other information

macOS 13.3

I would be willing to submit a PR to fix this issue

  • Yes
  • No

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Reactions: 2
  • Comments: 23 (12 by maintainers)

Most upvoted comments

I checked this on a Ubuntu machine with node 18.17.1. The same issue occurs

Error occurs in the following file node_modules/@nx/devkit/src/executors/read-target-options.js

The error occurs in line 24 image

since targetConfiguration is undefined.

I console logged projectConfiguration and saw that the following targets were available build, serve, test however, the target is coming as ‘my-app’

running the following command runs the app npm run dev -- --build-target build

but the following fails with a different error message npm run dev – --build-target serve

Facing the same issue on windows 10.

I downgraded the following package “@nx/angular”: “16.6.0”,

and the following dev dependencies “@nx/vite”: “16.6.0”, “nx”: “16.6.0”,

You could try this workaround for now.