-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"this.tree.readText is not a function" error after updating nrwl/angular to 14.2.4 #10678
Comments
I can't reproduce this on MacOS with latest. I believe it might be an OS-specific issue for windows. |
Update, I cannot reproduce this on Windows either. @chioarub Can you share the version of the Angular CLI that is within your workspace? |
I am also experiencing this error since migrating to 14.2.4 in addition I also get a similar error when trying to create a lazy loaded module `> Executing task: npx nx generate @schematics/angular:module test --module=app-routing --route=test2 --routing --no-interactive --dry-run <
[NX] Angular devkit readJsonWorkspace fell back to Nx workspaces logic npm ls @schematics/angular Info Environment ` Node : 16.13.2 nx : 14.2.4
|
@Coly010 There is no Angular CLI installed in the workspace. -- @schematics/angular@14.0.1` |
Removing node_modules and reinstalling got it working. Issue can be closed. |
Same error here when running a dry run of
Removing node_modules didn't fix it for me. |
Thank you @tunecino, that's what I needed too |
i already have @angular-devkit/schematics then also issue is not solved |
Adding @angular-devkit/schematics as a dev dependency fixed it for me also. |
@Bhargav210592 did you fix your issue? I have the same problem. |
yarn add -D @angular-devkit/schematics |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
After installing "@nrwl/angular": "^14.2.4" I am not able to use the Nx Console or the CLI to generate Angular applications
Current Behavior
TypeError when generating Angular applications using Cli/NxConsole plugin
Expected Behavior
Generate Angular applications using Cli/NxConsole plugin
Steps to Reproduce
npx create-nx-workspace test-workspace
npm install -D @nrwl/angular
npx nx generate @nrwl/angular:application web-ui --style=scss --port=4200 --routing --standaloneConfig --no-interactive --dry-run
Failure Logs
run
npx nx generate @nrwl/angular:application web-ui --style=scss --port=4200 --routing --standaloneConfig --no-interactive --dry-run
> NX Generating @nrwl/angular:application
TypeError: this.tree.readText is not a function at TreeWorkspaceHost.readFile (D:\Projects\Ts\Personal\test-workspace\node_modules\@schematics\angular\utility\workspace.js:23:26) at readJsonWorkspace (D:\Projects\Ts\Personal\test-workspace\node_modules\@schematics\angular\node_modules\@angular-devkit\core\src\workspace\json\reader.js:17:28) at Object.readWorkspace (D:\Projects\Ts\Personal\test-workspace\node_modules\@schematics\angular\node_modules\@angular-devkit\core\src\workspace\core.js:91:62) at async getWorkspace (D:\Projects\Ts\Personal\test-workspace\node_modules\@schematics\angular\utility\workspace.js:73:27) at async D:\Projects\Ts\Personal\test-workspace\node_modules\@schematics\angular\application\index.js:224:27
this.tree.readText is not a function
Environment
Windows 11
Node : 14.19.3
OS : win32 x64
npm : 6.14.17
nx : 14.2.4
@nrwl/angular : 14.2.4
@nrwl/cypress : 14.2.4
@nrwl/detox : Not Found
@nrwl/devkit : 14.2.4
@nrwl/eslint-plugin-nx : Not Found
@nrwl/express : Not Found
@nrwl/jest : 14.2.4
@nrwl/js : 14.2.4
@nrwl/linter : 14.2.4
@nrwl/nest : 14.2.4
@nrwl/next : Not Found
@nrwl/node : 14.2.4
@nrwl/nx-cloud : Not Found
@nrwl/nx-plugin : Not Found
@nrwl/react : Not Found
@nrwl/react-native : Not Found
@nrwl/schematics : Not Found
@nrwl/storybook : 14.2.4
@nrwl/web : Not Found
@nrwl/workspace : 14.2.4
typescript : 4.7.3
Community plugins:
The text was updated successfully, but these errors were encountered: