使用 yarn tsc 命令时,对于 'long' 和 'react-responsive' 会出现"错误 TS2688: 找不到类型定义文件"
When running the yarn tsc command, I encounter the following errors: error TS2688: Cannot find type definition file for 'long'. The file is in the program because: Entry point for implicit type library 'long' error TS2688: Cannot find type definition file for 'react-responsive'. The file is in the program because: Entry point for implicit type library 'react-responsive' My current package.json dependencies and devDependencies include: "dependencies": { "@AWS-sdk/client-s3": "^3.777.0", "@faker-js/faker": "^9.6.0", "@floating-ui/react": "^0.27.5", "@google-cloud/translate": "^9.0.1", "@googlemaps/react-wrapper": "^1.1.42", "@reduxjs/toolkit": "^2.6.1", "@sentry/nextjs": "^9.10.0", "@splidejs/react-splide": "^0.7.12", "@tanstack/react-query": "^5.69.0", "@tanstack/react-query-devtools": "^5.69.0", "@vis.gl/react-google-maps": "^1.5.2", "axios": "^1.8.4", "classnames": "^2.5.1", "clsx": "^2.1.1", "cookies-next": "^5.1.0", "date-fns": "^4.1.0", "dayjs": "^1.11.13", "dotenv": "^16.4.7", "formik": "^2.4.6", "formik-devtools-extension": "^0.1.8", "framer-motion": "^12.6.2", "i18next": "^24.2.3", "jest-environment-jsdom": "^29.7.0", "js-levenshtein": "^1.1.6", "lodash": "^4.17.21", "lottie-react": "^2.4.1", "next": "15.2.4", "next-auth": "^4.24.11", "next-i18next": "^15.4.2", "next-redux-wrapper": "^8.1.0", "react": "19", "react-beautiful-dnd": "^13.1.1", "react-cookie-consent": "^9.0.0", "react-datepicker": "^8.2.1", "react-device-detect": "^2.2.3", "react-dom": "19", "react-error-boundary": "^5.0.0", "react-helmet-async": "^2.0.5", "react-i18next": "^15.4.1", "react-intersection-observer": "^9.16.0", "react-phone-number-input": "^3.4.12", "react-query": "^3.39.3", "react-redux": "^9.2.0", "react-responsive": "^10.0.1", "react-select": "^5.10.1", "react-step-progress-bar": "^1.0.3", "react-switch": "^7.1.0", "react-textarea-autosize": "^8.5.8", "react-timer-hook": "^4.0.5", "react-tooltip": "^5.28.0", "redux": "^5.0.1", "redux-thunk": "^3.1.0", "sharp": "^0.33.5", "stripe": "^17.7.0", "styled-components": "^6.1.16", "swiper": "^11.2.6", "swr": "^2.3.3", "ts-jest": "^29.3.0", "use-debounce": "^10.0.4", "use-local-storage-state": "^19.5.0", "uuid": "^11.1.0", "yup": "^1.6.1" } , "devDependencies": { "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", "@chromatic-com/storybook": "^3.2.6", "@eslint/compat": "^1.2.7", "@eslint/eslintrc": "^3.3.1", "@eslint/js": "^9.23.0", "@storybook/addon-essentials": "^8.6.10", "@storybook/addon-interactions": "^8.6.10", "@storybook/addon-onboarding": "^8.6.10", "@storybook/addon-themes": "^8.6.10", "@storybook/blocks": "^8.6.10", "@storybook/nextjs": "^8.6.10", "@storybook/react": "^8.6.10", …
内容来源: yocontra/react-responsive