Webpack ts加载程序找不到rxjs 7.0.1的index.d.ts

Webpack ts加载程序找不到rxjs 7.0.1的index.d.ts,webpack,rxjs,ts-loader,Webpack,Rxjs,Ts Loader,我有一个项目类型脚本项目,并使用RxJs。运行构建时,这是对webpack的简单调用,我得到错误: TS7016: Could not find a declaration file for module 'rxjs'. '<mypath>\node_modules\rxjs\index.js' implicitly has an 'any' type. 这是因为您使用的是旧版本的TypeScript。在您的开发依赖项中,您有版本^3.8.3,非常感谢。有道理,我想就是这样。 {

我有一个项目类型脚本项目,并使用RxJs。运行构建时,这是对
webpack
的简单调用,我得到错误:

TS7016: Could not find a declaration file for module 'rxjs'. '<mypath>\node_modules\rxjs\index.js' implicitly has an 'any' type.

这是因为您使用的是旧版本的TypeScript。在您的开发依赖项中,您有版本
^3.8.3

,非常感谢。有道理,我想就是这样。
{
    "name": "calculator-browser",
    "version": "1.0.0",
    "description": "",
    "main": "src/index.ts",
    "scripts": {
        "serve": "webpack-dev-server",
        "build": "webpack && copyfiles -f src/index.html public",
        "test": "echo \"Error: no test specified\" && exit 1"
    },
    "prettier": {
        "tabWidth": 4,
        "useTabs": true
    },
    "repository": {
        "type": "git",
        "url": "git+https://github.com/JohannesSchacht/calculatorBrowser.git"
    },
    "author": "",
    "license": "ISC",
    "homepage": "https://sch-8.de",
    "devDependencies": {
        "copyfiles": "^2.4.1",
        "ts-loader": "^6.2.2",
        "typescript": "^3.8.3",
        "webpack": "^4.42.1",
        "webpack-cli": "^3.3.11",
        "webpack-dev-server": "^3.10.3"
    },
    "dependencies": {
        "immer": "^9.0.2",
        "redux": "^4.1.0",
        "rxjs": "^6.6.7"
    }
}