Nx: ast_utils_1.appsDir is not a function on nx generate

Created on 13 Jun 2020  路  3Comments  路  Source: nrwl/nx

Current Behavior

With NxAngular and NxCloud , I added Node plugin and run this command
nx generate @nrwl/node:application cloud-functions-ivl
which gives this red error:
ast_utils_1.appsDir is not a function

Expected Behavior

It should created a node app alongside angular app

Environment

"@nrwl/angular": "9.3.0", "@nrwl/nx-cloud": "^9.3.5", "@angular-devkit/build-angular": "~0.901.7", "@angular/cli": "9.1.7", "@angular/compiler-cli": "^9.1.9", "@angular/language-service": "^9.1.9", "@nrwl/cypress": "9.3.0", "@nrwl/jest": "9.3.0", "@nrwl/workspace": "9.3.0", "@nrwl/node": "^9.4.0",

bug

Most helpful comment

Yes, please use all the same versions of @nrwl/ packages :)

An easy way to keep them all aligned is by using the migrate command:

nx migrate latest which is setup in workspaces as npm run update :)

All 3 comments

I just had the same issue while generating a new app in my workspace. In my case this was caused by using @nrwl/[email protected] while all the other @nrwl/* packages were 9.3.0. Updating all to 9.4.0 solved the problem. It seems you have a similar situation with @nrwl/node being 9.4.0 while the other ones are 9.3.0.

As an improvement for Nx it may be nice if there were a warning when the package versions don't match.

Same here! set the same version in all @nrwl/ packages works!

Yes, please use all the same versions of @nrwl/ packages :)

An easy way to keep them all aligned is by using the migrate command:

nx migrate latest which is setup in workspaces as npm run update :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

markphip picture markphip  路  3Comments

dereklin picture dereklin  路  3Comments

zachnewburgh picture zachnewburgh  路  3Comments

joelmuskwe picture joelmuskwe  路  3Comments

zpydee picture zpydee  路  3Comments