Open
Description
Today I started getting the following error when running my tests:
Could not resolve the path '[path to the repo]/noop' with the extensions: '.ts', '.tsx', '.d.ts', '.js', '.jsx', '.cts', '.d.cts', '.cjs', '.mts', '.d.mts', '.mjs'.
This is unexpected and I didn't touch configuration of my tests. Cursor analyzed the output and deducted the the problem is with the following line:
Cursor explanation:
The error was occurring because the @web/dev-server-rollup package (version 0.6.4) has a hardcoded configuration that sets input: 'noop' in its createRollupPluginContexts.ts file. This causes Rollup to try to resolve a file called "noop" which doesn't exist in your project, leading to the TypeScript compilation error: [the error above]
As a solution Cursor suggested to create a dummy file noop.ts
at the root of the project with content export default {}
. After that, tests started working again. But I wonder why this happened in the first place? The package changed a year ago and this should not happen.
Metadata
Metadata
Assignees
Labels
No labels