Yaakov Chaikin (5) [Avatar] Offline
#1
Hi,

Any idea why VSCode does not understand where any of the imported standard libraries are?

It seems it's unhappy about finding even the core angular modules. See the screenshot attached.

(Yes, I did run npm install and all of those modules are, in fact, in the node_modules directory).

I think this might be VSCode craziness, but I am not 100% sure.

Thanks!
-Yaakov.
Anton Moiseev (27) [Avatar] Offline
#2
Please show the screenshot of your project structure and the content of the tsconfig.json file.
Yaakov Chaikin (5) [Avatar] Offline
#3
Hi,

The structure is actually directly from your repo. But here is the screenshot (attached).

Thanks!
-Yaakov.
Yaakov Chaikin (5) [Avatar] Offline
#4
Oh, yeah, forgot to include the tsconfig.json contents. It's in your repo anyway, but here it is:

{
  "compilerOptions": {
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "module": "commonjs",
    "outDir": "build",
    "target": "ES5"
  },
  "exclude": [
    "node_modules",
    "client"
  ]
}
Yaakov Chaikin (5) [Avatar] Offline
#5
Hi Anton,

Well, I figured it out... Hard to spot these types of errors.

Take a look at the 'client' folder. There is a jsconfig.son there that, I think, is overriding the tsconfig.json in the root directory.

Once you remove that file, all is well.

Ok, this was driving me absolutely crazy. smilie

Anyway, I'll create a pull request to fix.

All the best,
-Yaakov.
Anton Moiseev (27) [Avatar] Offline
#6
Thank you, Yaakov! For those who don't follow the GitHub repo here is the explanation:

jsconfig.json was required before VS Code 1.7 in order to support autocomplete and ES6 features in JS code (see release notes for details), but apparently now it breaks the TS files.