-
Notifications
You must be signed in to change notification settings - Fork 70
Closed
Labels
kind: regressionSpecific type of bug -- past behavior that worked is now brokenSpecific type of bug -- past behavior that worked is now brokenproblem: removed issue templateOP removed the issue template without good causeOP removed the issue template without good causescope: integrationRelated to an integration, not necessarily to core (but could influence core)Related to an integration, not necessarily to core (but could influence core)scope: vueRelated to integration with Vue (rollup-plugin-vue is long archived), not coreRelated to integration with Vue (rollup-plugin-vue is long archived), not corescope: watch modeRelated to Rollup's watch modeRelated to Rollup's watch modesolution: workaround availableThere is a workaround available for this issueThere is a workaround available for this issue
Description
What happens and why it is wrong
When running rollup in watch mode, the project will initially compile but changes to some files that trigger rollup watch, will cause a source file not found error from rp2:
[!] (plugin rpt2) Error: Could not find source file: '/<path removed>/watch-err/source/lib/module1.ts'.
Error: Could not find source file: '/<path removed>/watch-err/source/lib/module1.ts'.
at getValidSourceFile (/<path removed>/watch-err/node_modules/typescript/lib/typescript.js:153646:29)
at Object.getSyntacticDiagnostics (/<path removed>/watch-err/node_modules/typescript/lib/typescript.js:153896:52)
at /<path removed>/watch-err/node_modules/rollup-plugin-typescript2/src/index.ts:306:23
at TsCache.getDiagnostics (/<path removed>/watch-err/node_modules/rollup-plugin-typescript2/src/tscache.ts:298:49)
at TsCache.getSyntacticDiagnostics (/<path removed>/watch-err/node_modules/rollup-plugin-typescript2/src/tscache.ts:238:15)
at /<path removed>/watch-err/node_modules/rollup-plugin-typescript2/src/index.ts:304:15
at /<path removed>/watch-err/node_modules/rollup-plugin-typescript2/src/tscache.ts:183:61
at arrayEach (/<path removed>/watch-err/node_modules/rollup-plugin-typescript2/node_modules/lodash/lodash.js:516:11)
at Function._.each [as forEach] (/<path removed>/watch-err/node_modules/rollup-plugin-typescript2/node_modules/lodash/lodash.js:9368:14)
at TsCache.walkTree (/<path removed>/watch-err/node_modules/rollup-plugin-typescript2/src/tscache.ts:183:4)
Repository with reproduction code
Steps to reproduce:
- Run
rollup -c rollup.config.js --watch
- Trigger rollup watch by re-saving
module2.ts
orindex.ts
. Note that triggering watch withmodule1.ts
will not produce the error.
I assume this is related to the directory structure of the project which uses baseUrl
to point up to the "lib" dir. Also, I was not able to reproduce this without Vue.
Environment
MacOS 10.15
Node 16
IrvingArmenta
Metadata
Metadata
Assignees
Labels
kind: regressionSpecific type of bug -- past behavior that worked is now brokenSpecific type of bug -- past behavior that worked is now brokenproblem: removed issue templateOP removed the issue template without good causeOP removed the issue template without good causescope: integrationRelated to an integration, not necessarily to core (but could influence core)Related to an integration, not necessarily to core (but could influence core)scope: vueRelated to integration with Vue (rollup-plugin-vue is long archived), not coreRelated to integration with Vue (rollup-plugin-vue is long archived), not corescope: watch modeRelated to Rollup's watch modeRelated to Rollup's watch modesolution: workaround availableThere is a workaround available for this issueThere is a workaround available for this issue