question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Caching errors are back a la 5729

See original GitHub issue

Current Behavior

I do a clean build of my 1000+ module monorepo which means I remove node_modules/.cache/nx and dist folders. A full build is almost 4 hours but now it runs through it in less than 15 minutes with barely any modules created.

My command is: node --max_old_space_size=16384 ./node_modules/.bin/nx run-many --target=build --projects=administration,booking-engine,corporate,developer,extranet,hotel-booking-engine,maintenance,seller,single-sign-on,travel-agent,web-components --configuration=production --with-deps --parallel --max-parallel=8

Expected Behavior

All SPA apps should be built at the end of it

Steps to Reproduce

As with #5729, it’s very hard to tell you why it suddenly stopped working. After #5729 was resolved, the build worked flawlessly. In the meantime, Angular got updated and it stopped working again.

Failure Logs

There are no error logs. It just completes with a success.

Environment

@nrwl/angular : 12.3.6 @nrwl/cli : 12.3.6 @nrwl/cypress : 12.3.6 @nrwl/devkit : 12.3.6 @nrwl/eslint-plugin-nx : 12.3.6 @nrwl/express : Not Found @nrwl/jest : 12.3.6 @nrwl/linter : 12.3.6 @nrwl/nest : Not Found @nrwl/next : Not Found @nrwl/node : Not Found @nrwl/react : Not Found @nrwl/schematics : Not Found @nrwl/tao : 12.3.6 @nrwl/web : Not Found @nrwl/workspace : 12.3.6 @nrwl/storybook : 12.3.6 @nrwl/gatsby : Not Found typescript : 4.2.4 Angular : 12.0.4 Angular CLI : 12.0.3 @angular-devkit/build-angular : 12.0.3 ng-packagr 12.0.5

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
bjornharvoldcommented, Jun 16, 2021

Hi @leosvelperez,

Thank you for your detailed response! Very appreciated 😃

We started pulling the build apart and here is what we learned:

  • All our 1000+ libraries are created with the --buildable flag FYI
  • All libraries build correctly by themselves
  • All apps build correctly if we build them individually WITHOUT the --with-deps flag. E.g. nx build extranet. What is strange is that, in the past, the app wouldn’t build if we didn’t add --with-deps because it would be complaining abut missing dependencies and tell us to build those first.
  • Our simplest apps [that have very few dependencies] build with the --with-deps flag.
  • Our larger apps [with many monorepo dependencies] fail when we use the --with-deps flag. E.g. nx build extranet --with-deps. No errors, the build will just stop building and it will stop building consistently at the same place for each app respectively. So, different SPA will stop at their own same specific spot in the build process every time. The build will omit building certain libraries [as explained above] without notifying us and we think that stops the build when the next libraries, that are dependent on those libraries, can’t find them.
  • The command run-many also works fine WITHOUT the --with-deps flag. E.g. nx run-many --target build --projects extranet,booking-engine --configuration production.

In a nutshell, I think --with-deps gets confused with large dependency graphs [since when I am unsure]. What’s also confusing is that we don’t have to add --with-deps any longer as the apps are intelligent enough to build its own dependencies. Was this always the case. I am pretty certain I remember my apps complaining about missing dependencies and to build them first when I tried to build them before.

So my build runs and all we had to do was remove the --with-deps flag. So strange.

0reactions
smasalacommented, Aug 9, 2021

@FrozenPandaz This is happening for us on 12.3.6 when using @nrwl/workspace:run-commands - it returns the cached output to the console (success|failure) but doesn’t restore the build files (dist)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced content caching settings on Mac - Apple Support
Key Description Default value AllowImports Allows import (upload) requests. Yes MetricsInterval 60 (seconds) Parents none
Read more >
How to Fix the 'Cached Preview' Error in After Effects
Try cleaning the database and cache by navigating to After Effects > Preferences > Media and Disk Cache.
Read more >
Clear cache & cookies - Computer - Google Account Help
When you use a browser, like Chrome, it saves some information from websites in its cache and cookies. Clearing them fixes certain problems,...
Read more >
jpay app not compatible with device
Page 1 of problems reported by JPay customers: The JP4 Tablet is not an iPad. ... any and all fees associated with shipping...
Read more >
12.2. Clearing the Cache | Chapter 12. Preventing ... - Drupal
Clear or rebuild your site's internal caches to ensure they are up-to-date with the most recent data, using the user interface or Drush....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found