admin管理员组文章数量:1356413
I was following JSPM getting started guide and I want to install jquery package so I execute below mand.
jspm install jquery
But when I try to import it in typescript like below
import $ from 'jquery'
I'm getting a error from typescript piler saying error TS2307: Cannot find module 'jquery'.
Not only for this library for other libraries I'm getting the same error.
I was following JSPM getting started guide and I want to install jquery package so I execute below mand.
jspm install jquery
But when I try to import it in typescript like below
import $ from 'jquery'
I'm getting a error from typescript piler saying error TS2307: Cannot find module 'jquery'.
Not only for this library for other libraries I'm getting the same error.
2 Answers
Reset to default 5You need to include type definitions for jquery
in the pilation context, you can grab them from https://github./DefinitelyTyped/DefinitelyTyped
I encountered on exactly same kind of error during VSBuild on Azure DevOps.
In my case, solution was just add new extra step Install npm
into build pipeline and error was gone.
I hope it will help somebody!
本文标签: javascriptTypescript Compiler error TS2307 Cannot find module 39jquery39Stack Overflow
版权声明:本文标题:javascript - Typescript Compiler error TS2307: Cannot find module 'jquery' - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744047303a2581766.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论