-
Notifications
You must be signed in to change notification settings - Fork 12k
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
TS2304: cannot find name "xxx"——after update to rc.0 #5046
Comments
Same here, seems that it's due to changes with |
After getting some sweat, I found the workaround: The new Change it to this and it will work again: {
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"es2016",
"dom"
],
"target": "es5"
}
} It was missing the |
On the other hand, IDEs are lost with so many files and use the one they find at the root, that's why you see warnings in your app when using the dom, or in your tests (there is now a dedicate tsconfig file for the tests). This was introduced by 69e6c71 @filipesilva do you think that IDEs are ever gonna understand the separate tsconfig? Some IDEs don't allow to specify several ones, how will they get that the src files must be compiled with |
@sinedied comment is spot on. I forgot to leave the @cexbrayat nope, don't think they'll even understand. IDEs will use the top-level one for everything so it will essentially but a mish-mash of all the common parts. It's unfortunate and I wish there was a better solution. As long we need two tsconfigs in the same folder (app/specs) I don't see a better alternative. |
@cexbrayat @filipesilva AFAIK, Webstorm (and other Jetbrains similar IDEs) use the most top-level Maybe the e2e/app config could be renamed to just |
@sinedied in that case the IDE would still not catch the correct config for tests (like you said). You'd then have to fiddle with the app tsconfig until it covered both app and unit test files which would leave you were we were before. So if you have to compromise, it's better to compromise in a central place while making it obvious what each tsconfig does, and making them independent. |
@deebloo I'm afraid just adding the |
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. |
OS?
Windows 10
Versions.
@angular/cli: 1.0.0-rc.0
node: 6.9.1
os: win32 x64
@angular/common: 2.4.8
@angular/compiler: 2.4.8
@angular/core: 2.4.8
@angular/forms: 2.4.8
@angular/http: 2.4.8
@angular/platform-browser: 2.4.8
@angular/platform-browser-dynamic: 2.4.8
@angular/router: 3.4.8
@angular/cli: 1.0.0-rc.0
@angular/compiler-cli: 2.4.8
Repro steps.
follow update instruction from beta.32 to rc.0
The log given by the failure.
webstrom failure:
Nothing change just cover the
src/app
folder.cli
andclean cache
.rc.0
ng new upgrade-project --skip-install
to new a update project.src/app
folder and paste it into update-project cover the old one.ng serve
works well ,no errors output, but all my file with "confirm","document", etc, got a note.Mention any other details that might be useful.
If I cancel the settings in webstorm, it works fine.
Webstorm version:
2016.3.3
Anyone the same?
The text was updated successfully, but these errors were encountered: