colord: ERR_PACKAGE_PATH_NOT_EXPORTED error from colord

I’m unable to build my app due to an error coming from a dependency that relies on Colord. Any help with this would be appreciated!

When running npm run build, I get the following error:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './plugins/names' is not defined by "exports" in ./node_modules/colord/package.json

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 21 (10 by maintainers)

Most upvoted comments

Released v1.7.2 with a simplified exports map. I assume that your bundler/loader can’t process wildcarted subfolder exports, so I defined all of them manually.

Could you update colord in your lock file and check how it works?

Thanks for helping me here and good luck with your projects!

I got the exact same issue about the same time as @bildungsroman. Thanks @omgovich! Your workaround did the trick. You saved me a lot of headache.

Tested inside Webpack-based project and in Node.js backend app as well. No errors, works as expected. Really hope that everything is fine in your apps too.

To perform a quick test, you can run npm install colord@^1.7.2 -D in your project root. It should update “colord” installed by “postcss-colormin”.