-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug(cdk): Update Failed : Cannot read property 'length' of null #19779
Comments
In some cases the schematics fail to read a file which results in an error, because we weren't guarding against it properly. We had the correct types in place, but the tsconfig didn't have `strictNullChecks` enabled which prevented the compiler from reporting the errors. Fixes angular#19779.
In some cases the schematics fail to read a file which results in an error, because we weren't guarding against it properly. We had the correct types in place, but the tsconfig didn't have `strictNullChecks` enabled which prevented the compiler from reporting the errors. Fixes angular#19779.
@filol Thanks for this issue! Do you know if you have any files in your project that are not readable? or in better terms which might have permission issues? We have a fix for this in progress, but we'd like to understand how this issue surfaces on your end. If possible, it would be great to have the requested information above, and potentially when you get a chance, it might be helpful if you manually modify the If that's not possible (due to the incremental nature of ng update), let me know. Not a big deal. Thanks! |
@devversion @crisbeto I checked I have all the rights, I even closed my IDE, launched the console in administrator mode and it is exactly the same error. I'm not sure I understood the "requested information above" of your message. I have manually log the path, the error is throw on the first path :
If you want i can provide you this file but it's really basic |
@filol Thanks! yeah, with Does your project have the file |
@devversion Yes, he exist and no they are not on the same level. Here is the return of the tree command without the files not relevant
|
In some cases the schematics fail to read a file which results in an error, because we weren't guarding against it properly. We had the correct types in place, but the tsconfig didn't have `strictNullChecks` enabled which prevented the compiler from reporting the errors. Fixes #19779.
In some cases the schematics fail to read a file which results in an error, because we weren't guarding against it properly. We had the correct types in place, but the tsconfig didn't have `strictNullChecks` enabled which prevented the compiler from reporting the errors. Fixes #19779.
Reopening this as the error has been fixed, but it doesn't fix that actual stylesheets are not migrated. It looks like |
In some situations, developers will run `ng update` from a sub directory of the project. This currently results in a noop migration as file system paths were computed incorrectly. This is because ng-update always assumed that the CWD is the workspace root in the real file system. This is not the case and therefore threw off path resolution. We can fix this by determining the workspace file system path from the virtual file system host tree's. This is not ideal, but best solution for now until we can parse/resolve TypeScript projects purely from within the virtual file system. This is currently not easy to implement and requires helpers from TS which are not exposed yet. See: microsoft/TypeScript#13793. This is tracked with: COMP-387. Fixes angular#19779.
In some situations, developers will run `ng update` from a sub directory of the project. This currently results in a noop migration as file system paths were computed incorrectly. This is because ng-update always assumed that the CWD is the workspace root in the real file system. This is not the case and therefore threw off path resolution. We fix this by fully relying on the virtual file system now. Previously we mixed virtual and real file system as TypeScript relied on the real file system for parsing configuration, matching and reading files. This commit adds a new compiler host for config parsing and program creation that works fully with a virtual file system. This is something we had planned a long time ago as schematics should never deal with the real file system. We can re-use this logic in other repositories too (such as Angular framework, potentially the CLI, and universal schematics). Ideally we will share this as part of better tooling for migrations. Fixes angular#19779.
In some situations, developers will run `ng update` from a sub directory of the project. This currently results in a noop migration as file system paths were computed incorrectly. This is because ng-update always assumed that the CWD is the workspace root in the real file system. This is not the case and therefore threw off path resolution. We fix this by fully relying on the virtual file system now. Previously we mixed virtual and real file system as TypeScript relied on the real file system for parsing configuration, matching and reading files. This commit adds a new compiler host for config parsing and program creation that works fully with a virtual file system. This is something we had planned a long time ago as schematics should never deal with the real file system. We can re-use this logic in other repositories too (such as Angular framework, potentially the CLI, and universal schematics). Ideally we will share this as part of better tooling for migrations. Fixes angular#19779.
In some situations, developers will run `ng update` from a sub directory of the project. This currently results in a noop migration as file system paths were computed incorrectly. This is because ng-update always assumed that the CWD is the workspace root in the real file system. This is not the case and therefore threw off path resolution. We fix this by fully relying on the virtual file system now. Previously we mixed virtual and real file system as TypeScript relied on the real file system for parsing configuration, matching and reading files. This commit adds a new compiler host for config parsing and program creation that works fully with a virtual file system. This is something we had planned a long time ago as schematics should never deal with the real file system. We can re-use this logic in other repositories too (such as Angular framework, potentially the CLI, and universal schematics). Ideally we will share this as part of better tooling for migrations. Fixes angular#19779.
In some situations, developers will run `ng update` from a sub directory of the project. This currently results in a noop migration as file system paths were computed incorrectly. This is because ng-update always assumed that the CWD is the workspace root in the real file system. This is not the case and therefore threw off path resolution. We fix this by fully relying on the virtual file system now. Previously we mixed virtual and real file system as TypeScript relied on the real file system for parsing configuration, matching and reading files. This commit adds a new compiler host for config parsing and program creation that works fully with a virtual file system. This is something we had planned a long time ago as schematics should never deal with the real file system. We can re-use this logic in other repositories too (such as Angular framework, potentially the CLI, and universal schematics). Ideally we will share this as part of better tooling for migrations. Fixes angular#19779.
In some situations, developers will run `ng update` from a sub directory of the project. This currently results in a noop migration as file system paths were computed incorrectly. This is because ng-update always assumed that the CWD is the workspace root in the real file system. This is not the case and therefore threw off path resolution. We fix this by fully relying on the virtual file system now. Previously we mixed virtual and real file system as TypeScript relied on the real file system for parsing configuration, matching and reading files. This commit adds a new compiler host for config parsing and program creation that works fully with a virtual file system. This is something we had planned a long time ago as schematics should never deal with the real file system. We can re-use this logic in other repositories too (such as Angular framework, potentially the CLI, and universal schematics). Ideally we will share this as part of better tooling for migrations. Fixes angular#19779.
In some situations, developers will run `ng update` from a sub directory of the project. This currently results in a noop migration as file system paths were computed incorrectly. This is because ng-update always assumed that the CWD is the workspace root in the real file system. This is not the case and therefore threw off path resolution. We fix this by fully relying on the virtual file system now. Previously we mixed virtual and real file system as TypeScript relied on the real file system for parsing configuration, matching and reading files. This commit adds a new compiler host for config parsing and program creation that works fully with a virtual file system. This is something we had planned a long time ago as schematics should never deal with the real file system. We can re-use this logic in other repositories too (such as Angular framework, potentially the CLI, and universal schematics). Ideally we will share this as part of better tooling for migrations. Fixes angular#19779.
In some situations, developers will run `ng update` from a sub directory of the project. This currently results in a noop migration as file system paths were computed incorrectly. This is because ng-update always assumed that the CWD is the workspace root in the real file system. This is not the case and therefore threw off path resolution. We fix this by fully relying on the virtual file system now. Previously we mixed virtual and real file system as TypeScript relied on the real file system for parsing configuration, matching and reading files. This commit adds a new compiler host for config parsing and program creation that works fully with a virtual file system. This is something we had planned a long time ago as schematics should never deal with the real file system. We can re-use this logic in other repositories too (such as Angular framework, potentially the CLI, and universal schematics). Ideally we will share this as part of better tooling for migrations. Fixes angular#19779.
In some situations, developers will run `ng update` from a sub directory of the project. This currently results in a noop migration as file system paths were computed incorrectly. This is because ng-update always assumed that the CWD is the workspace root in the real file system. This is not the case and therefore threw off path resolution. We fix this by fully relying on the virtual file system now. Previously we mixed virtual and real file system as TypeScript relied on the real file system for parsing configuration, matching and reading files. This commit adds a new compiler host for config parsing and program creation that works fully with a virtual file system. This is something we had planned a long time ago as schematics should never deal with the real file system. We can re-use this logic in other repositories too (such as Angular framework, potentially the CLI, and universal schematics). Ideally we will share this as part of better tooling for migrations. Fixes angular#19779.
In some situations, developers will run `ng update` from a sub directory of the project. This currently results in a noop migration as file system paths were computed incorrectly. This is because ng-update always assumed that the CWD is the workspace root in the real file system. This is not the case and therefore threw off path resolution. We fix this by fully relying on the virtual file system now. Previously we mixed virtual and real file system as TypeScript relied on the real file system for parsing configuration, matching and reading files. This commit adds a new compiler host for config parsing and program creation that works fully with a virtual file system. This is something we had planned a long time ago as schematics should never deal with the real file system. We can re-use this logic in other repositories too (such as Angular framework, potentially the CLI, and universal schematics). Ideally we will share this as part of better tooling for migrations. Fixes angular#19779.
In some situations, developers will run `ng update` from a sub directory of the project. This currently results in a noop migration as file system paths were computed incorrectly. This is because ng-update always assumed that the CWD is the workspace root in the real file system. This is not the case and therefore threw off path resolution. We fix this by fully relying on the virtual file system now. Previously we mixed virtual and real file system as TypeScript relied on the real file system for parsing configuration, matching and reading files. This commit adds a new compiler host for config parsing and program creation that works fully with a virtual file system. This is something we had planned a long time ago as schematics should never deal with the real file system. We can re-use this logic in other repositories too (such as Angular framework, potentially the CLI, and universal schematics). Ideally we will share this as part of better tooling for migrations. Fixes #19779.
In some situations, developers will run `ng update` from a sub directory of the project. This currently results in a noop migration as file system paths were computed incorrectly. This is because ng-update always assumed that the CWD is the workspace root in the real file system. This is not the case and therefore threw off path resolution. We fix this by fully relying on the virtual file system now. Previously we mixed virtual and real file system as TypeScript relied on the real file system for parsing configuration, matching and reading files. This commit adds a new compiler host for config parsing and program creation that works fully with a virtual file system. This is something we had planned a long time ago as schematics should never deal with the real file system. We can re-use this logic in other repositories too (such as Angular framework, potentially the CLI, and universal schematics). Ideally we will share this as part of better tooling for migrations. Fixes #19779.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Reproduction
I can't share my code because it's a big project, hope the stack will help you
ng update @angular/material --force
Expected Behavior
Working
Actual Behavior
Stack trace in log file :
Environment
The text was updated successfully, but these errors were encountered: