Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New export type broke lots of apps #208

Closed
smddzcy opened this issue Dec 13, 2020 · 8 comments
Closed

New export type broke lots of apps #208

smddzcy opened this issue Dec 13, 2020 · 8 comments
Labels

Comments

@smddzcy
Copy link

smddzcy commented Dec 13, 2020

Hi there,

Your 3.3.0 update just broke all of our apps. We're using @ant-design/colors, which uses tinycolor, and the 3.3.0 ES module exports broke our apps with this error:

import { tinycolor } from './index';
^^^^^^
Cannot use import statement outside a module

It might be an issue with @ant-design/colors as well, but I don't think 3.3.0 is backward-compatible with 3.2.1. It's always better to respect semver and not make breaking changes on minor version updates 🤞

@pgsteven
Copy link

same issue, revert 3.3.0 please!

@scttcper
Copy link
Owner

🎉 This issue has been resolved in version 3.3.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@smddzcy
Copy link
Author

smddzcy commented Dec 13, 2020

@scttcper Thanks a lot for the hotfix

@xXAvoraXx
Copy link

same issue 3.3.1

@steezeburger
Copy link

steezeburger commented Feb 9, 2021

I'm also having this issue again, but my yarn.lock shows the latest for ant-design-color, which is using 3.3.1 of tinycolor. Did something else happen recently to start causing this issue again?

@scttcper
Copy link
Owner

scttcper commented Feb 9, 2021

@steezeburger i think its ant-design-color this time, I would use 5.0.0 instead. 5.1.0 changed something with imports that was then reverted without a patch version yet. https://github.com/ant-design/ant-design-colors/releases/tag/v5.1.0

unreleased revert commit - ant-design/ant-design-colors#75

@steezeburger
Copy link

@scttcper thanks for the quick reply!

I will try to use 5.0.0. Unfortunately I am not using ant-design-colors directly. I am using antd, which requires ant-design-colors, which requires your library. antd's package.json specifies ^5.0.0 for ant-design-colors, so it installs 5.1.0. I am not a front end guy, is it possible to define sub dependency versions so I can explicitly install 5.0.1?

I of course could fork antd, but I do not want to begin maintaining that fork.

@scttcper
Copy link
Owner

scttcper commented Feb 9, 2021

@steezeburger since it sounds like you're using yarn you can use resolutions https://classic.yarnpkg.com/en/docs/selective-version-resolutions/

Adding a resolution to your package.json and then running yarn install should fix it until they release a new version.

// package.json
{
  "resolutions": {
    "@ant-design/colors": "5.0.0"
  }
}

You might also be able to add @ant-design/colors to your dependencies pinned to "5.0.0" and get that specific version instead of 5.1.0

see also - ant-design/ant-design-colors#77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants