导出ts类型声明时报错(Error occurred when exporting ts type declaration)
// index.ts 导出类型时
export * from '../types/index'
// types/index.d.ts
// 错误解析模型 export interface ParseStack { errorType: string msg: string list: ParseStackItem[] } export interface ParseStackItem { url: string line: number column: number filename: string }
报错信息:
src/index.ts:15:14: ERROR: Could not resolve "../types/index" at failureErrorWithLog (/Users/supaur/Desktop/gitProject/alpha/abnormal-sdk/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1575:15) at /Users/supaur/Desktop/gitProject/alpha/abnormal-sdk/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1033:28 at runOnEndCallbacks (/Users/supaur/Desktop/gitProject/alpha/abnormal-sdk/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1447:61) at buildResponseToResult (/Users/supaur/Desktop/gitProject/alpha/abnormal-sdk/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1031:7) at /Users/supaur/Desktop/gitProject/alpha/abnormal-sdk/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1143:14 at responseCallbacks.<computed> (/Users/supaur/Desktop/gitProject/alpha/abnormal-sdk/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:680:9) at handleIncomingPacket (/Users/supaur/Desktop/gitProject/alpha/abnormal-sdk/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:735:9) at Socket.readFromStdout (/Users/supaur/Desktop/gitProject/alpha/abnormal-sdk/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:656:7) at Socket.emit (events.js:400:28) at addChunk (internal/streams/readable.js:293:12)
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too