首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >预期directory/node_modules/@antv/g6-core/lib/types/index.d.ts(24,37):类型中的TypeScript错误。TS1110

预期directory/node_modules/@antv/g6-core/lib/types/index.d.ts(24,37):类型中的TypeScript错误。TS1110
EN

Stack Overflow用户
提问于 2022-04-02 07:51:41
回答 1查看 879关注 0票数 0

在从GitHub克隆回购并通过运行纱安装安装包之后,当我运行项目时会得到这个错误。我试着更新的最新版本,但不起作用。此外,尝试更新类型记录4.1.2不起作用。

  • Node v: 14.17.3
  • Npm v: 6.14.13
  • Yarn v: 1.22.10

,这是我的package.json

代码语言:javascript
复制
{
    "name": "zis3-frontend",
    "version": "4.6.41.3",
    "created": "2022-03-15 20:23:03",
    "private": true,
    "dependencies": {
        "@ant-design/charts": "^1.0.8",
        "@ant-design/icons": "^4.1.0",
        "@types/i18next": "^13.0.0",
        "@types/react-highlight-words": "^0.16.1",
        "@types/react-redux": "^7.1.8",
        "@types/react-router": "^5.1.7",
        "@types/react-router-dom": "^5.1.5",
        "antd": "^4.10.2",
        "antd-button-color": "^1.0.3",
        "antd-mask-input": "^0.1.13",
        "array-move": "^4.0.0",
        "axios": "^0.19.2",
        "fast-xml-parser": "^3.20.3",
        "i18next": "17.0.1",
        "i18next-browser-languagedetector": "^4.1.1",
        "i18next-http-backend": "^1.0.8",
        "moment": "^2.25.3",
        "node-sass": "4.14.1",
        "query-string": "^6.13.0",
        "react": "^16.13.1",
        "react-csv": "^2.2.2",
        "react-dom": "^16.13.1",
        "react-highlight-words": "^0.16.0",
        "react-i18next": "10.11.0",
        "react-icons": "^4.1.0",
        "react-json-pretty": "^2.2.0",
        "react-quill": "^1.3.5",
        "react-redux": "^7.2.0",
        "react-router": "^5.1.2",
        "react-router-dom": "^5.1.2",
        "react-scripts": "^3.4.3",
        "react-sortable-hoc": "^2.0.0",
        "redux": "^4.0.5",
        "redux-thunk": "^2.3.0",
        "sweetalert2": "^11.3.0"
    },
    "scripts": {
        "start": "react-scripts start",
        "build": "react-scripts --max_old_space_size=4096 build && REACT_APP_BUILD_VERSION=$(./ci/get_fe_version.py) && sed -i -- 's/%REACT_APP_BUILD_VERSION%/'$REACT_APP_BUILD_VERSION'/g' build/index.html && echo React Build Version = $REACT_APP_BUILD_VERSION",
        "test": "react-scripts test",
        "eject": "react-scripts eject"
    },
    "postcssSortingConfig": {
        "properties-order": "alphabetical"
    },
    "browserslist": {
        "production": [
            ">0.2%",
            "not dead",
            "not op_mini all"
        ],
        "development": [
            "last 1 chrome version",
            "last 1 firefox version",
            "last 1 safari version"
        ]
    },
    "devDependencies": {
        "prettier": "2.0.5",
        "stylelint": "^13.3.3",
        "stylelint-config-sass-guidelines": "^7.0.0",
        "stylelint-config-standard": "^20.0.0",
        "stylelint-statement-max-nesting-depth": "^2.0.1",
        "typescript": "^3.9.7"
    }
}

TS Config

代码语言:javascript
复制
{
  "compilerOptions": {
    "target": "es6",
    "module": "esnext",
    "jsx": "react",
    "lib": ["dom", "dom.iterable", "scripthost", "es5", "es6"],
    "baseUrl": "./src",
    "allowJs": true,
    "skipLibCheck": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noEmit": true,
    "outDir": "./dist",
    "rootDir": "./src",
    "removeComments": true,
    "noEmitOnError": true,
    "noImplicitAny": false,
    "noLib": false,
    "preserveConstEnums": true,
    "declaration": false,
    "suppressImplicitAnyIndexErrors": true,
    "sourceMap": true
  },
  "filesGlob": ["./src/**/*.ts", "./src/**/*.tsx", "!./node_modules/**"],
  "include": ["./src/**/*"],
  "exclude": ["node_modules", "**/*.spec.ts"],
  "rules": {
    "quotemark": "single",
    "autoFixOnSave": true
  }
}
EN

回答 1

Stack Overflow用户

发布于 2022-05-18 09:05:31

例如:我做了以下npm卸载-D类型记录(此卸载3.9.7版本)

这解决了这个问题

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71715768

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档