sgratzl / chartjs-chart-funnel

Chart.js Funnel chart
http://www.sgratzl.com/chartjs-chart-funnel/
MIT License
18 stars 12 forks source link

Error referencing non-existent .pnp.cjs file after installing chartjs-chart-funnel #53

Closed fserafa closed 5 days ago

fserafa commented 1 week ago

Hello,

I'm encountering an issue after installing the chartjs-chart-funnel package in my Angular project. When trying to serve the application, I receive the following error:

ERROR Error: Unable to resolve specifier 'D:\\Projetos\\Temp\\node_modules\\chartjs-chart-funnel\\.pnp.cjs'

Issue Details:

The error is pointing to a .pnp.cjs file in node_modules/chartjs-chart-funnel, but this file does not actually exist in the folder. I do not use Yarn or Plug'n'Play (PnP) in my project, and I rely solely on npm for package management. The error started occurring after converting my Angular project to use Native Module Federation. The issue persists even after: Removing node_modules and reinstalling dependencies with npm. Cleaning the Angular cache. Verifying and adjusting the tsconfig.federation.json and Webpack configuration files. Searching the project for references to .pnp.cjs, which points only to this package.

What I've Tried:

Manually removing the .pnp.cjs reference in my tsconfig and other configuration files, but the error persists. Reinstalling the package, and ensuring there are no other Yarn/PnP configurations in my project. Checking for incorrect path aliases or module resolution issues in the Webpack configuration. Downgrading and upgrading chartjs-chart-funnel, but the error still occurs.

Request:

Could this be related to an internal dependency or configuration that introduces Yarn's PnP support into the package? If so, is there a workaround or a possible fix to ensure compatibility with npm-only environments?

Any guidance or advice on how to resolve this would be appreciated!

Thank you!

Additional Information:

Angular Version: 18.2.7 chart.js Version: 4.3.3 chartjs-chart-funnel Version: 4.2.2 Node.js Version: 20.18.0 Package Manager: npm

sgratzl commented 1 week ago

I guess you are referring to https://github.com/sgratzl/chartjs-chart-funnel/blob/e786bfa80ef12a3c093d858c0dd69641019b2b30/package.json#L39

I'm surprised that this is causing any troubles. - angular seems very specific.

it seems like this is no longer required with a later version of yarn

sgratzl commented 5 days ago

should be fixed with the latest version