Skip to content

(rpt2 plugin) Error: Could not find source file: .../dist/index.d.ts #621

@StarpTech

Description

@StarpTech

I have only one file in src/index.ts

{
  "name": "react-modern-calendar",
  "version": "0.0.1",
  "license": "MIT",
  "source": "src/index.ts",
  "main": "dist/index.js",
  "module": "dist/index.module.js",
  "unpkg": "dist/index.umd.js",
  "types": "dist/index.d.ts",
  "scripts": {
    "build": "microbundle",
    "dev": "microbundle watch"
  }
}
$ microbundle
rpt2: options error TS6053: File '/mnt/ssd/repositories/react-modern-calendar/dist/index.d.ts' not found.
(rpt2 plugin) Error: Could not find source file: '/mnt/ssd/repositories/react-modern-calendar/dist/index.d.ts'.
Error: Could not find source file: '/mnt/ssd/repositories/react-modern-calendar/dist/index.d.ts'.
    at getValidSourceFile (/mnt/ssd/repositories/react-modern-calendar/node_modules/typescript/lib/typescript.js:139148:29)
    at Object.getEmitOutput (/mnt/ssd/repositories/react-modern-calendar/node_modules/typescript/lib/typescript.js:139533:30)
    at /mnt/ssd/repositories/react-modern-calendar/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:27438:40
    at arrayEach (/mnt/ssd/repositories/react-modern-calendar/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:534:11)
    at forEach (/mnt/ssd/repositories/react-modern-calendar/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:9360:14)
    at Object._onwrite (/mnt/ssd/repositories/react-modern-calendar/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:27429:13)
    at Object.generateBundle (/mnt/ssd/repositories/react-modern-calendar/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:27402:27)
    at /mnt/ssd/repositories/react-modern-calendar/node_modules/rollup/dist/shared/node-entry.js:13117:25
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

The solution is to remove the dist after every build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions