The rollup watch encountered an issue when attempting to resolve a dependency for transformation

I am working on a node project called A that has the following dependencies:

A depends on B (^1.2.0)
A depends on C (^1.0.0)
C depends on B (^1.0.0)

The issue arises from the dependency on B. Strangely, when I use rollup without the watch flag (-w), everything works smoothly. However, once I include the watch flag (-w), rollup starts behaving erratically and throws this error message:

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

Am I overlooking something here? :( Thank you for any help!

Answer №1

Encountering a similar issue arose for me while utilizing the rollup-plugin-typescript2 library.

Initially, I verified the existence of the file and proceeded to add the requested file in the include section within the tsconfig.json to see if it made any difference. While this approach did yield results, the solution itself proved to be less than ideal.

Subsequently, after deleting the rpt2_cache folder located within the project workspace, I attempted the process once more, which resolved the issue successfully.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Ways to launch angularjs project in production mode sans the use of npm start

Currently, I am in the process of developing a website with angularjs and have set up a local development server using npm. After moving my project directory to a public AFS directory, I encountered an issue where the npm dependencies are not functioning ...

Different ways to designate the return type of a class constructor, such as utilizing a proxy method

As I venture into the Typescript realm, I have encountered a challenge while experimenting with a Proxy as a return value from a class constructor. Consider the following code snippet: class Container { constructor() { return new Proxy(this, contai ...

The stacked bar chart in Apex is not displaying correctly on the x-axis

Currently, I am utilizing the Apex stacked bar chart within my Angular 16 project. In this scenario, there are 4 categories on the x-axis, but unfortunately, the bars are not aligning correctly with the x-axis labels. The data retrieved from my API is as ...

Trouble Publishing NPM Package with GitlabCI Package Registry

My objective is to release an npm package (preferably private) on the Gitlab Registry. Below are the files I am working with: Package.json : { "name": "@sushislasher/sushislasher-package", "version": "0.0.1" ...

Transforming PropTypes into proptypes while avoiding all files in the node modules directory using jscodeshift

Embarking on backend react setups is completely new to me. Initially, everything was smooth sailing until I delved into styling... and encountered this issue TypeError: Cannot read property 'object' of undefined ./node_modules/radium/lib/compon ...

Ways to include a js configuration file within a TypeScript npm package that can be customized by future users of the package

In my current project, I am working on coding a Typescript NPM package designed to function as a CLI tool. To simplify things, let's imagine that this package will take the default export from a developer-created "config.js" file and display it in th ...

live-reload is generating these pesky alerts

I keep receiving these warnings while using live-reload. I'm unsure about the purpose of all these scripts. What is causing these warnings to appear? '//@ sourceURL' and '//@ sourceMappingURL' are outdated, please replace with & ...

Working with relative paths in React Native TypeScript using WebStorm

My variable color is located in the path app/theme. To set it up, I created a package.json file in app/package.json with the following content: { "name": "app" } Now, to import color in TypeScript files, I use the following syntax: import { color } fro ...

Leveraging Fastify's preHandler middleware functionality

Implementing a middleware to validate user authentication before accessing the specified route. Encountering an issue where tokenService inside tokenController is showing as undefined when passing tokenController.authUser as a middleware. However, the met ...

Check the type of the indexed value

I need help with a standard interface: interface IProps<T> { item: T; key: keyof T; } Is there a way to guarantee that item[key] is either a string or number so it can be used as an index for Record<string | number, string>? My codeba ...

Installing dependencies for Material-UI using npm

I just started my React and NPM journey. After setting up a new directory, running npm init, and then npm install to install React, here is how my configuration in package.json looks like: { "name": "reactapp", "version": "1.0.0", "description": "", ...

Is there a way to access the value or key of a JSON property in an Angular template for rendering purposes?

Having trouble displaying the JSON values of certain properties on screen. Utilizing Angular Material table to showcase my JSON response. The code snippet below is responsible for rendering the JSON data: <mat-card-content class="dashboard-card-cont ...

how to enhance Request type in Express by adding a custom attribute

In my quest to create a custom middleware function in Node.js using TypeScript, I am facing an issue where I am trying to save a decoded JSON web token into a custom request property called 'user' like so: function auth(req: Request, res: Respo ...

What is causing the error message related to the token parameter in the verify function of the jwt authentication process?

While attempting to implement jwt authentication, I encountered an error during the verification process. The error message states: "No overload matches this call. Overload 1 of 3, '(token: string, secretOrPublicKey: Secret, options?: VerifyOptions ...

Is it possible to include CSS from a node_module (npm package)?

Using React on the client side, I have the task of incorporating CSS from an npm package. Previously, I would manually copy the styles to my local directory. Additionally, I leverage GULP in my workflow. ...

Navigating collisions in the ECS architecture: Best practices

I'm currently developing a game using typescript and the ECS design pattern. One of the challenges I'm facing is handling collisions between different entities within the game world. I have an entity called Player which comprises several componen ...

Guide on transferring ElementHandle to a different webpage

My goal is to loop through an array of ElementHandles and insert them into a second Page using the following code: const htmlContent: string = ` <html><head></head><body> <div class="section">Section 1</div> ...

Encountered an issue while attempting to incorporate the android platform into Cordova framework

I am currently using Ubuntu 13.10 and have installed Cordova via npm. However, when I try to run cordova platform add android on a project, I encounter the following error message: /home/user/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:12 ...

Error: Unable to access attribute 'item_name' as it is not defined

I'm new to React.js and I'm attempting to build a todo app. The main feature is a text input field where users can add items to their list. When I run "npm start," the app works perfectly and displays the expected output on my designated port. Ho ...

Having difficulty with the proper functioning of npm install chromedriver

Is there a way to update the ChromeDriver to a newer version other than using the following commands: npm install chromedriver, npm install chromedriver --chromedriver_cdnurl=https://npm.taobao.org/mirrors/chromedriver, npm install chromedriver --chromedr ...