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.

Unable to update NX to latest version - No such file or directory error

See original GitHub issue

Expected Behavior

Updating Nx following https://nx.dev/angular/guides/update guide goes without errors.

Current Behavior

My current workspace version is 8.7.1. I’ve attempted to update it to the latest following the guide on https://nx.dev/angular/guides/update, but got the following error:

$ npx nx migrate @nrwl/workspace
Fetching meta data about packages.
It may take a few minutes.
Fetching @nrwl/workspace@latest
Fetching @ngrx/store@8.5.0
Fetching @ngrx/effects@8.5.0
Fetching @ngrx/entity@8.5.0
Fetching @ngrx/router-store@8.5.0
Fetching @ngrx/schematics@8.5.0
Fetching @ngrx/store-devtools@8.5.0
Fetching @angular-devkit/architect@0.803.14
Fetching @angular-devkit/build-angular@0.803.14
Fetching @angular-devkit/build-ng-packagr@0.803.14
Fetching @angular-devkit/build-webpack@0.803.14
Fetching @angular-devkit/core@8.3.14
Fetching @angular-devkit/schematics@8.3.14
Fetching @angular/cli@8.3.14
Fetching @angular/common@8.2.12
Fetching @angular/compiler@8.2.12
Fetching @angular/compiler-cli@8.2.12
Fetching @angular/core@8.2.12
Fetching @angular/platform-browser@8.2.12
Fetching @angular/platform-browser-dynamic@8.2.12
Fetching @angular/router@8.2.12
Fetching @angular/upgrade@8.2.12
Fetching @schematics/angular@8.3.14
Fetching @nrwl/angular@undefined
Fetching @nrwl/cypress@undefined
Fetching @nrwl/eslint-plugin-nx@undefined
Fetching @nrwl/express@undefined
Fetching @nrwl/jest@undefined
Fetching @nrwl/linter@undefined
Fetching @nrwl/nest@undefined
Fetching @nrwl/next@undefined
Fetching @nrwl/node@undefined
Fetching @nrwl/react@undefined
Fetching @nrwl/tao@undefined
Fetching @nrwl/web@undefined
ENOENT: no such file or directory, open '/var/folders/yn/tfydvv613h95b9364681z6k00000gn/T/tmp-25830QNp94WeWCI3j/node_modules/@angular/cli/@schematics/angular/migrations/migration-collection.json'
Command failed: ./node_modules/.bin/tao migrate @nrwl/workspace
$ npx nx report
  @nrwl/angular : Not Found
  @nrwl/cli : 8.7.1
  @nrwl/cypress : Not Found
  @nrwl/eslint-plugin-nx : Not Found
  @nrwl/express : Not Found
  @nrwl/jest : 8.7.1
  @nrwl/linter : 8.7.1
  @nrwl/nest : 8.7.1
  @nrwl/next : Not Found
  @nrwl/node : 8.7.1
  @nrwl/react : Not Found
  @nrwl/schematics : Not Found
  @nrwl/tao : 8.7.1
  @nrwl/web : Not Found
  @nrwl/workspace : 8.7.1
  typescript : 3.5.3

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:9
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
Tre665commented, Feb 25, 2020

@alfonsobravi I had this issue in a previous migration. What it solved for me was to install the package @nrwl/tao by hand and then rerun the migration. We started with nx pretty early on and this package was added sometime when there was the transation from angular cli only to nx cli afaik. I also used to update just with yarn update, maybe that was also the reason why this package was missing for us. To be totally honest, I am to this day not sure what the preferred way is to keep the repo up to date. I thought now the migrate command should be preferred. But on the release blog (for example here it always states to just use yarn update.

5reactions
demisxcommented, May 18, 2020

Ran into the same issue trying to upgrade Nx v9.2.4 -> v9.3.0. Had to install @nrwl/tao manually again npm i @nrwl/tao --save-dev.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting — DeepStream 6.1.1 Release documentation
Warnings or errors for failing plugins are displayed on the terminal. ... cannot open shared object file: No such file or directory.
Read more >
could not retrieve NX scripts directory - NoMachine Forums
After a bit of digging, the problem boils down to nxexec command always failing with “Could not retrieve NX scripts directory” error.
Read more >
Failed to create nx workspace - node.js - Stack Overflow
I am facing the same issue for resolving use below command for creating new workspace:- npx create-nx-workspace --preset=angular ...
Read more >
Install and Upgrade FTD on Firepower Appliances - Cisco
This document describes the installation, upgrade and registration of ... No such file or directory Flushing all current IPv4 rules and user ...
Read more >
Automate Updating Dependencies - Nx
Update to the latest Nx version · The installed dependencies are updated including the package.json (and node_modules ). · The source code in...
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