You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
作者您好,我遇到一个问题,就是我打包时会报ts的错,这个是怎么回事呢?
报错具体代码:
npm run build
blog@0.1.0 build
tsc && vite build
src/sections/About/index.tsx:5:19 - error TS7016: Could not find a declaration file for module 'react-reveal/Pulse'. 'C:/Users/123/Downloads/pengBlog-master/pengBlog-master/index/node_modules/react-reveal/Pulse.js' implicitly has an 'any' type.
Try npm i --save-dev @types/react-reveal if it exists or add a new declaration (.d.ts) file containing declare module 'react-reveal/Pulse';
5 import Pulse from 'react-reveal/Pulse';
~~~~~~~~~~~~~~~~~~~~
src/sections/About/index.tsx:6:23 - error TS7016: Could not find a declaration file for module 'react-reveal/HeadShake'. 'C:/Users/123/Downloads/pengBlog-master/pengBlog-master/index/node_modules/react-reveal/HeadShake.js' implicitly has an 'any' type.
Try npm i --save-dev @types/react-reveal if it exists or add a new declaration (.d.ts) file containing declare module 'react-reveal/HeadShake';
6 import HeadShake from 'react-reveal/HeadShake';
~~~~~~~~~~~~~~~~~~~~~~~~
src/sections/Home/index.tsx:8:22 - error TS2307: Cannot find module './pagemore.json' or its corresponding type declarations.
8 import pageMore from "./pagemore.json"
~~~~~~~~~~~~~~~~~
src/sections/Project/index.tsx:43:60 - error TS2322: Type '{ className: string; ref: MutableRefObject<HTMLDivElement | null>; alt: string; }' is not assignable to type 'DetailedHTMLProps<HTMLAttributes, HTMLDivElement>'.
Property 'alt' does not exist on type 'DetailedHTMLProps<HTMLAttributes, HTMLDivElement>'.
作者您好,我遇到一个问题,就是我打包时会报ts的错,这个是怎么回事呢?
报错具体代码:
npm run build
src/sections/About/index.tsx:5:19 - error TS7016: Could not find a declaration file for module 'react-reveal/Pulse'. 'C:/Users/123/Downloads/pengBlog-master/pengBlog-master/index/node_modules/react-reveal/Pulse.js' implicitly has an 'any' type.
Try
npm i --save-dev @types/react-reveal
if it exists or add a new declaration (.d.ts) file containingdeclare module 'react-reveal/Pulse';
5 import Pulse from 'react-reveal/Pulse';
~~~~~~~~~~~~~~~~~~~~
src/sections/About/index.tsx:6:23 - error TS7016: Could not find a declaration file for module 'react-reveal/HeadShake'. 'C:/Users/123/Downloads/pengBlog-master/pengBlog-master/index/node_modules/react-reveal/HeadShake.js' implicitly has an 'any' type.
Try
npm i --save-dev @types/react-reveal
if it exists or add a new declaration (.d.ts) file containingdeclare module 'react-reveal/HeadShake';
6 import HeadShake from 'react-reveal/HeadShake';
~~~~~~~~~~~~~~~~~~~~~~~~
src/sections/Home/index.tsx:8:22 - error TS2307: Cannot find module './pagemore.json' or its corresponding type declarations.
8 import pageMore from "./pagemore.json"
~~~~~~~~~~~~~~~~~
src/sections/Project/index.tsx:43:60 - error TS2322: Type '{ className: string; ref: MutableRefObject<HTMLDivElement | null>; alt: string; }' is not assignable to type 'DetailedHTMLProps<HTMLAttributes, HTMLDivElement>'.
Property 'alt' does not exist on type 'DetailedHTMLProps<HTMLAttributes, HTMLDivElement>'.
43
~~~
Found 4 errors in 3 files.
Errors Files
2 src/sections/About/index.tsx:5
1 src/sections/Home/index.tsx:8
1 src/sections/Project/index.tsx:43
The text was updated successfully, but these errors were encountered: