Closed joeypedicini92 closed 2 years ago
@joeypedicini92 a few questions to help, as I have not been able to reproduce this myself:
"enableIvy": false
in the tsconfig.json
)yarn/npm install
)ngc
fail when run manually on the project? (./node_modules/.bin/ngc tsconfig.json
)ngcc
fail when run manually on the project? (./node_modules/.bin/ngcc --tsconfig tsconfig.json
)I can try to get a sample project together when I have a bit more time. But it happens as soon as I open a project in vscode.
I am using Ivy, however in the vscode angular language server settings if I disable Ivy, I no longer get these errors (but then type checking and everything seems to not work right)
dependencies are installed, using yarn
ngc worked
ngcc worked
for additional reference I'm using an Nx repo in one repo but the other is just a plain angular repo
This is happening to me as well, as of the Insider version release 11/10. Same specs. We have multiple projects in our repo, with a tsconfig.json at the root of the repo:
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "src",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"module": "esnext",
"moduleResolution": "node",
"experimentalDecorators": true,
"importHelpers": true,
"target": "es2015",
"typeRoots": ["node_modules/@types"],
"lib": ["es2018", "dom"],
"paths": {
"@app/*": ["app/*"],
"@shared/*": ["app/shared/*"],
"@env/*": ["environments/*"],
"pb-design-system": ["../dist/pb-design-system"],
"pb-design-system/*": ["../dist/pb-design-system/*"]
}
}
}
and then in the main project where Angular is (and all the files), /client
, we have tsconfig.app.json:
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"baseUrl": ""
},
"files": [
"main.ts",
"polyfills.ts"
],
"include": [
"src/**/*.d.ts"
]
}
I am also getting this error on all our other projects, which use Nx Workscapes. These consist of a series of libs, each of which has it's own tsconfig.json file and they all point to the main one at the root:
{
"extends": "../../../tsconfig.base.json",
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json"
}
],
"angularCompilerOptions": {
"strictInjectionParameters": true,
"strictTemplates": true
}
}
Not sure if any of this matters, since it all worked fine like this up until 2 days ago when the error occurred.
FWIW, ngcc
runs fine with the command ./node_modules/.bin/ngcc --tsconfig tsconfig.json
@smlombardi You mentioned this was working for you two days ago. What updates happened between then and now? If nobody can provide a reproduction, hopefully we can at least determine what version this started happening with. Can you try installing different versions of the language service extension to see if there is an older one that works? If not, then the issue may have been caused by an update to the libraries in your project and it would be good to find what update that was.
It happened after I updated Code to the insiders version that came out 2 days ago. It happened immediately on relaunch
@smlombardi Just to clarify, there were no other updates to the project or extension? Updating the Code version didn't result in an update to the vscode extension? I'll go grab the latest insider version now to see if I can reproduce this.
Okay, I have been able to isolate this to the vscode 1.62.1
release. The error does not occur in the 1.62.0
release. When updating to 1.62.1
with no other changes, the ngcc
process fails.
We are still actively investigating this issue and are tracking https://github.com/microsoft/vscode/issues/136988 as the likely resolution.
In the meantime, the error we show does give the appropriate information. ngcc
failed to run, which might cause the language service to not work correctly but can be resolved by npm/yarn run ngcc
. Or if you are already running a dev server, ngcc
likely already ran and you don't have to do anything.
Closing as resolved in the 1.62.3
release of VSCode.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
π bug report
Is this a regression?
Yes, I am currently on v13.0.0, I don't remember when it started throwing this error. ### Description A clear and concise description of the problem... I'm getting a popup everytime tsconfig.json changes and angular language service starts. Happening in multiple Angular v12 repos ## Bug Type What does this bug affectReproduction
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Logs
Log file gives us deep insight into the behavior and performance of the extension. If the issue is a performance problem or an error occured, please provide the output of the log file below.
Set Angular Log level to verbose.
Screenshots
π Your Environment
Angular Version:
Extension Version:
VSCode Version:
Operating System:
Anything else relevant?