SOLVED

node_modules\@types\jquery\index.d.ts(2956,62): error TS2304: Cannot find name 'Iterable'.

Highlighted
Deleted
Not applicable

Guys

 

Following this tutorial from Vesa:

https://www.youtube.com/watch?v=-3m__hRQxEI&list=PLR9nK3mnD-OXvSWvS2zglCzz4iplhVrKq&index=6

 

I am getting this error:

 

[22:32:04] Error - typescript - node_modules\@types\jquery\index.d.ts(2956,62): error TS2304: Cannot find name 'Iterable'.
Request: '/temp/manifests.js'
Request: '/node_modules/@microsoft/sp-loader/dist/sp-loader-assembly_en-us.js'
Request: '/node_modules/@microsoft/sp-webpart-workbench/lib/api/workbenchInit.js'
[22:32:04] Error - 'typescript' sub task errored after 6.6 s
TypeScript error(s) occurred.
(node:11820) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 10): TypeError: options.message.replace is not a function
(node:11820) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.

 

The only difference I can see is that my npm package versions are different as shown below:

 

{
"name": "cargando-javascripts-externos",
"version": "0.0.1",
"private": true,
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"build": "gulp bundle",
"clean": "gulp clean",
"test": "gulp test"
},
"dependencies": {
"@microsoft/sp-core-library": "~1.2.0",
"@microsoft/sp-webpart-base": "~1.2.0",
"@types/jquery": "^3.2.12",
"@types/jqueryui": "^1.11.36",
"@types/webpack-env": ">=1.12.1 <1.14.0",
"jquery": "^3.2.1",
"jqueryui": "^1.11.1"
},
"devDependencies": {
"@microsoft/sp-build-web": "~1.2.0",
"@microsoft/sp-module-interfaces": "~1.2.0",
"@microsoft/sp-webpart-workbench": "~1.2.0",
"gulp": "~3.9.1",
"@types/chai": ">=3.4.34 <3.6.0",
"@types/mocha": ">=2.2.33 <2.6.0"
}
}
 
any ideas?
A new version of this video is available from https://www.youtube.com/watch?v=PqPlsXwG6zU&list=PLR9nK3mnD-OXvSWvS2zglCzz4iplhVrKq. In this tutorial, let's ad...
2 Replies
Highlighted
Best Response
Solution
Try downgrading to jQuery v2 and also installing its typings v2.
Highlighted

Answer from StackOverflow. Add to tsconfig.json file.

"target": "es5",
    "lib": [ "es2015", "dom" ]