IntelliJ Ultimate 2018.2 compiler dont find AngularJs 1.4

Hello,

i have following Problem:

I updated from IntelliJ Ultimate 2018.1 to 2018.2 and now the editor compiler doesnt find my AngularJs version (error:(95, 23) TS2304:Cannot find name 'angular'.) . It also dont recognise my exported modules. When I downgrade the version to 2018.1 everything is fine.

It is an very old Project with AngularJs 1.4 with NPM, Bower and Grunt. Also in the Project is a Spring Boot Project.

The Project Structure is:

- Shop (root)

-- server

--- Spring Boot Project

-- client

--- Gruntfile.js

--- package.json

--- bower.json

 

I am missing some Configuration that are needed now?

 

Thanks you in advance for you anwser

0
5 comments

Do you have angular, etc. typings (d.ts) files available in your project? How many tsconfig.*.json files are there, what do your TypeScript preferences (Settings | Languages & Frameworks | TypeScript) look like?

0
Avatar
Permanently deleted user

- The typescript reference taken from the node_modules  "node_modules\typedoc\node_modules\typescript" Version 1.8.10 

- Installed is 

"angular": "~1.4.10",

- The Project use a deprecated libary grunt-typescript. The only existing tsconfig is in the Node Module grunt-typescript@0.7.0:

{
"compilerOptions": {
"outDir": "tasks",
"target": "ES5",
"module": "commonjs",
"noEmitOnError": true,
"diagnostics": true,
"noLib": true,
"experimentalDecorators": true
},
"files": [
"src/index.ts",
"node_modules/typescript/bin/lib.core.d.ts",
"typings/lib.support.d.ts"
]
}
0

angular 1.4.10 npm package doesn't include angular d.ts files; so it seems that you don't have them available in your project, do you? TypeScript compiler errors are expected then...

0
Avatar
Permanently deleted user

Thats correct there are not included. I added the tsconfig.json in the client folder and seems now to work. My guess is that the older IntelliJ Ultimate Version scanned also the node_modules and take the tsconfig.json from the  grunt-typescript lib and the new version doesnt scan the folder. A bug or wanted behaviour? Thank for helping with my problem

0

>My guess is that the older IntelliJ Ultimate Version scanned also the node_modules and take the tsconfig.json from the  grunt-typescript lib and the new version doesnt scan the folder

No, it didn't.

But in older versions the TypeScript service was disabled for projects without tsconfig.json files, thus no compiler errors were shown. Now it's enabled for all projects by default

0

Please sign in to leave a comment.