Nx: Warning with lighthouse CI on build

Created on 1 Sep 2020  路  5Comments  路  Source: nrwl/nx

Current Behavior

After adding lighthouse ci to a nx workspace, it adds a .lighthouseci folder for report files when running the ci locally.

image

After that on building an app within the nx workspace, a warning appears :

Warning: Fell back to using 'fs' to identify .lighthouseci/lhr-1598951258904.html as deleted. Please open an issue at https://github.com/nrwl/nx so we can investigate.

Expected Behavior


Steps to Reproduce

Here is a repo to reproduce it : https://github.com/geromegrignon/spoon-starter :

  • run nx build
  • run npm run lhci
  • run nx build <-- error in the console

Here are the steps starting from scratch :

  • create a nx workspace with a default angular app
  • install the lighthouse ci CLI : npm install -g @lhci/cli
  • add a .lighthouserc.js config file :
module.exports = {
  ci: {
    collect: {
      staticDistDir: './dist/apps/<app-name>',
    },
    upload: {
      target: 'temporary-public-storage',
    },
  },
};

  • run nx build
  • run lhci autorun
  • run nx build <-- error displayed in the console

Failure Logs

Warning: Fell back to using 'fs' to identify .lighthouseci/lhr-1598951258904.html as deleted. Please open an issue at https://github.com/nrwl/nx so we can investigate.

Environment


  nx : Not Found
  @nrwl/angular : 10.1.0
  @nrwl/cli : 10.1.0
  @nrwl/cypress : 10.1.0
  @nrwl/eslint-plugin-nx : Not Found
  @nrwl/express : Not Found
  @nrwl/jest : 10.1.0
  @nrwl/linter : Not Found
  @nrwl/nest : Not Found
  @nrwl/next : Not Found
  @nrwl/node : Not Found
  @nrwl/react : Not Found
  @nrwl/schematics : Not Found
  @nrwl/tao : 10.1.0
  @nrwl/web : Not Found
  @nrwl/workspace : 10.1.0
  typescript : 3.9.7
repro needed bug

Most helpful comment

Hi
that is not a nx problem,
it apears when:
create file in location
build/serve
move file in another location

previous location shows warning
but when you commit warnigns disappear

image

All 5 comments

I'm having this issue too with cypress image snapshot:

Warning: Fell back to using 'fs' to identify #0.actual.png as deleted. Please open an issue at https://github.com/nrwl/nx so we can investigate.
Warning: Fell back to using 'fs' to identify #0.png as deleted. Please open an issue at https://github.com/nrwl/nx so we can investigate.

image

In my case, it adds an __image_snapshots__ folder into project-e2e/src/integration

Hi there @geromegrignon !

I tried to reproduce your issue locally, and unfortunately I could not.

I installed Lighthouse CI globally, I cloned your repo, I built it, then I ran npm run lhci and then I built again, and I did not get a warning.

Screen Shot 2020-09-03 at 12 06 16

And here's the nx report from your repo (as you have already posted above):
Screen Shot 2020-09-03 at 12 28 44

Similarly, I created an Nx workspace from scratch, with a default Angular app, as you suggested, added a .lighthouserc.js file with the contents you suggested, I built, then I lhci autorun-ed, then I built again, and I got no warnings or errors.

Screen Shot 2020-09-03 at 12 20 18

Here's the nx report of my generated app (the same with your app):
Screen Shot 2020-09-03 at 12 31 01

Could you point me to any other information that may help me reproduce your issue?

Hey @mandarini,

I feel sorry for that, i can't reproduce it anymore myself.

I'll close the issue by now.
@tonivj5 please open a dedicated issue

Hi
that is not a nx problem,
it apears when:
create file in location
build/serve
move file in another location

previous location shows warning
but when you commit warnigns disappear

image

To add to @Areen3, git add . also removed the warnings without the need to commit.

Was this page helpful?
0 / 5 - 0 ratings