Migration to @nrwl/[email protected] fails.
Migration failes (and takes a really long time), with the message
Unknown error: Error: No valid exports main found for 'D:\dev\projects\xxxxx\node_modules\@angular\cli\node_modules\uuid'
Migration succeeds.
From a @nrwl/[email protected]:
npm run nx migrate @nrwl/[email protected]
npm run nx migrate --run-migrations=migrations.json
> nx "migrate" "--run-migrations=migrations.json"
Running migration @nrwl/workspace:update-9-3-0
Successfully finished @nrwl/workspace:update-9-3-0
---------------------------------------------------------
Running migration @nrwl/workspace:update-eslint-config
Successfully finished @nrwl/workspace:update-eslint-config
---------------------------------------------------------
Running migration @nrwl/workspace:update-linters-exclude
Successfully finished @nrwl/workspace:update-linters-exclude
---------------------------------------------------------
Running migration @nrwl/workspace:add-decorate-cli
Successfully finished @nrwl/workspace:add-decorate-cli
---------------------------------------------------------
Running migration @nrwl/workspace:add-default-branch-to-nx-json
Successfully finished @nrwl/workspace:add-default-branch-to-nx-json
---------------------------------------------------------
Running migration @nrwl/workspace:solution-tsconfigs
Could not update .vscode/launch.json: Invalid JSON
Could not update .vscode/settings.json: Invalid JSON
Referencing apps/xxxx/tsconfig.app.json in apps/xxxx/tsconfig.json
Referencing apps/xxxx/tsconfig.spec.json in apps/xxxx/tsconfig.json
Referencing apps/xxxx-e2e/tsconfig.e2e.json in apps/xxxx-e2e/tsconfig.json
Successfully finished @nrwl/workspace:solution-tsconfigs
---------------------------------------------------------
Running migration @nrwl/workspace:migrate-eslintrc-tsconfig
Successfully finished @nrwl/workspace:migrate-eslintrc-tsconfig
---------------------------------------------------------
Running migration @angular/core:migration-v10-missing-injectable
Successfully finished @angular/core:migration-v10-missing-injectable
---------------------------------------------------------
Running migration @angular/core:migration-v10-module-with-providers
Successfully finished @angular/core:migration-v10-module-with-providers
---------------------------------------------------------
Running migration @angular/core:migration-v10-undecorated-classes-with-decorated-fields
Successfully finished @angular/core:migration-v10-undecorated-classes-with-decorated-fields
---------------------------------------------------------
Running migration @nrwl/angular:update-10-0-0
Updating @angular/cli to 10.0.0
Unknown error: Error: No valid exports main found for 'D:\dev\projects\xxxxx\node_modules\@angular\cli\node_modules\uuid'
@angular/cli migration failed, see above.
nx : Not Found
@nrwl/angular : 10.0.12
@nrwl/cli : 10.0.12
@nrwl/cypress : 10.0.12
@nrwl/eslint-plugin-nx : Not Found
@nrwl/express : Not Found
@nrwl/jest : 10.0.12
@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.0.12
@nrwl/web : Not Found
@nrwl/workspace : 10.0.12
typescript : 3.9.7
I should remember Google is my friend 馃檲
https://stackoverflow.com/questions/62832881/unknown-error-error-no-valid-exports-main-found-for-src-main-ui-node-modules-u
I ran the migration with node 13, switching back to node 12 fixed it.
@D0rmouse if you want to catch these types of problems in the future, try setting up an nvmrc file for your project.