HostMAX
HostMAX

Reputation: 176

rollup watch failed to resolve transform dependency

I have a node project (namely A) that has the following dependencies:

A requires B (^1.2.0)
A requires C (^1.0.0)
C requires B (^1.0.0)

And the problem comes from that B dependency. For some reason, if I use rollup without using watch (-w), then everything is rolled up nicely. However, when I added watch (-w), then rollup starts to misbehave and throws this:

Error: Transform dependency node_modules/B/node_modules/C/index.ts does not exist.

Did I miss something here ? :( Thanks!

Upvotes: 1

Views: 377

Answers (1)

MarcoL
MarcoL

Reputation: 9989

I had a similar issue when using the rollup-plugin-typescript2 library.

At first I did check the file existed and then add the file requested in the include file within the tsconfig.json to check if it worked. It did work but the solution wasn't great.

Then I removed the rpt2_cache folder in the project workspace and tried again, all ok now.

Upvotes: 2

Related Questions