matzkoh / prettier-plugin-packagejson

Prettier plugin for package.json
MIT License
316 stars 10 forks source link

Not found `lib/index.js` after updating to `2.4.11` #147

Closed stekycz closed 8 months ago

stekycz commented 8 months ago

After updating to 2.4.11 from 2.4.10 I am getting the following error

[error] Cannot find module '<...>/node_modules/prettier-plugin-packagejson/lib/index.js' imported from <...>/node_modules/prettier/index.mjs

It looks like the recently renamed file (.js -> .cjs) is not included in the published package or the plugin is missconfigured somewhere.

Prettier version: 3.2.5

matzkoh commented 8 months ago

@stekycz

Thanks for the report. I could not reproduce it on my end. Could you please create a minimal reproduction repository?

stekycz commented 8 months ago

Thank you for a quick reaction!

🤦‍♂️ My bad, the plugin is registered by using relative path ./node_modules/prettier-plugin-packagejson/lib/index.js instead of simple prettier-plugin-packagejson. Will fix it on my side.