Nx: Angular. workspace_1.addLintFiles is not a function when try to generate lib

Created on 12 Nov 2019  路  4Comments  路  Source: nrwl/nx

Prerequisites

  • [x] I am running the latest version
  • [x] I checked the documentation and found no answer
  • [x] I checked to make sure that this issue has not already been filed
  • [x] I'm reporting the issue to the correct repository (not related to Angular, AngularCLI or any dependency)

Expected Behavior

ng generate @nrwl/angular:library time-picker generate a component

Current Behavior

Returns an error workspace_1.addLintFiles is not a function

Failure Information (for bugs)

After calling a command ng generate @nrwl/angular:library via console and selection of stylesheet format it returns an error workspace_1.addLintFiles is not a function

If I call nx "generate" "@nrwl/angular:library" "time-picker" nothing happened

Steps to Reproduce

  1. Go to console.
  2. Run command provided above

Context

Packages versions:
@angular/cli: 8.0.0
rxjs: 6.4.0
@nrwl/angular: 8.7.0

repro needed bug

All 4 comments

I wasn't able to reproduce this. Will you provide a repo?

Looks like some wrong packages was installed in my node modules. Issue should be closed

Hi @vsamotskiy. How did you resolve this problem. Can you help to me?

For me, this was the package @nrwl/angular importing @nrwl/workspace the function addLintFiles. My @nrwl/workspace dependency was older and did not export the function. Updating @nrwl/workspace solved the problem for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sukei picture sukei  路  3Comments

vimalraj-a picture vimalraj-a  路  3Comments

zpydee picture zpydee  路  3Comments

markphip picture markphip  路  3Comments

IonFoXx picture IonFoXx  路  3Comments