After migrating our application to NX version 19.5.3, we encountered an issue where we are unable to run a target with the @nx/rollup/rollup executor. The same codebase builds successfully when using NX version 17.3.2.
Expected Behavior
The build should succeed as it was doing on Nx 17.3.2.
Bundling app-1...
[plugin rpt2] apps/app-1/src/loader.ts:1:29 - error TS6059: File '/Users/pedroperez/dev/nx19-workspace/common/lib1/src/index.ts' is not under 'rootDir' '/Users/pedroperez/dev/nx19-workspace/apps/app-1'. 'rootDir' is expected to contain all source files.
The file is in the program because:
Imported via '@nx-19-workspace/common/lib1' from file '/Users/pedroperez/dev/nx19-workspace/apps/app-1/src/loader.ts'
Root file specified for compilation
1 import { Nx19Library } from '@nx-19-workspace/common/lib1';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at getRollupError (/Users/pedroperez/dev/nx19-workspace/node_modules/rollup/dist/shared/parseAst.js:282:41)
at Object.error (/Users/pedroperez/dev/nx19-workspace/node_modules/rollup/dist/shared/parseAst.js:278:42)
at Object.error (/Users/pedroperez/dev/nx19-workspace/node_modules/rollup/dist/shared/rollup.js:804:32)
at RollupContext.error (/Users/pedroperez/dev/nx19-workspace/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:1457:26)
at /Users/pedroperez/dev/nx19-workspace/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:27639:26
at Array.forEach (<anonymous>)
at printDiagnostics (/Users/pedroperez/dev/nx19-workspace/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:27615:17)
at typecheckFile (/Users/pedroperez/dev/nx19-workspace/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:27972:9)
at Object.<anonymous> (/Users/pedroperez/dev/nx19-workspace/node_modules/rollup-plugin-typescript2/dist/rollup-plugin-typescript2.cjs.js:28118:21)
at Generator.next (<anonymous>)
Bundle failed: app-1
Current Behavior
After migrating our application to NX version 19.5.3, we encountered an issue where we are unable to run a target with the @nx/rollup/rollup executor. The same codebase builds successfully when using NX version 17.3.2.
Expected Behavior
The build should succeed as it was doing on Nx 17.3.2.
GitHub Repo
https://github.com/paperez/nx19-workspace
Steps to Reproduce
npm run build:app-1
Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
Working repo https://github.com/paperez/nx17-workspace