-
Notifications
You must be signed in to change notification settings - Fork 26.2k
Undecorated classes with DI migration not working TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string #33143
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
Comments
I just saw this issue. Is this still relevant? We landed various fixes and this issue has been reported before v9 stable has been released. I'm closing this in the meanwhile. Please feel free to create a new one, or respond here. Thanks! |
I've run into this issue trying to upgrade a project created on v8 and upgrading it to v9 running version 9.0.2 IIRC. It was stable for sure as I try to avoid pre-releases for production systems. |
Interesting. Thanks for the quick reply. Do you think you would be able to re-run into this issue? If so, and you would be willing to help, that would be highly appreciated. I'm specifically looking for simply re-running the update with the latest CLI beta version that includes angular/angular-cli@66b218c. That will give us a full stack trace of the error. |
I'd be also happy to have simple reproduction steps. On my end I did not see this issue surface. I've tested various projects against this migration before v9 landed. |
Sure, I'll do another test run with the latest versions and see what I come up with. I'll see if I can figure out some reproduction example as well by stripping the project I'm trying to upgrade but no promises on that. |
Just tried migrating again using 9.0.4 and I see there's been some very nice updates to the migration process. It now pointed out the source file with an issue (needed an explicit constructor) and it even added a TODO-comment in the file for me. And then the migration concluded instead of failing and needing to be resumed. So sometime between the version I tried before and 9.0.4 the error has been replaced with a very helpful message and comment which made resolving it trivial. So while issue was still around in some stable version it's absolutely resolved now for my case at least. Thanks for the prod to try again with the latest fixes. |
Thanks for trying the migration again! Very appreciated. I'm unsure though what change would have fixed this from stable v9 to the current patch release. I'll keep this closed until someone else jumps in and says that the issue is still present. |
I'm getting this error using ng update. Following the guide going from 8-9. Doesn't like my tsconfig.app.json
|
@StefanChristou Do you have a full error stack trace? I'm looking for more details: #33143 (comment). |
Error message for above comment is:
Migration completed. Tried re-running: "ng update @angular/core --migrate-only migration-v9-undecorated-classes-with-di" Looks like I'm missing a property from from src/tsconfig.app.json. But what I wonder?? |
Full stack trace
|
Thanks @StefanChristou. Unfortunately the CLI doesn't print out the full stack trace, but just the error message. We added full-stack trace support in the latest next release of the CLI. When you get a chance, it would be great to re-run the update with the latest Let me know if that is possible. The current error doesn't help determining the root cause. I've spent time looking for potential |
@devversion I have the the same issue as @StefanChristou and have updated the CLI to vnext. |
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. |
🐞 bug report
Affected Package
The issue is caused by package @angular/core/schematics/migrations/undecorated-classes-with-di/index.ts#L174
Is this a regression?
no, this migration code appear in v9 only not in v8
Description
Undecorated classes with DI migration not working
🔬 Minimal Reproduction
🔥 Exception or Error
🌍 Your Environment
Angular Version:
Anything else relevant?
tsconfig.app.json
tsconfig.json
rudimentary angular.json
I do not have error on ng serve
When debuging nodejs code
--inspect-brk
migration run without error (but im not sure it udpate my codebase)The text was updated successfully, but these errors were encountered: