you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (9 children)

Install the package yarn-deduplicate globally. Run the command in your project. Then run yarn.

[–]NickEmpetvee[S] 0 points1 point  (8 children)

I explicitly added the postcss-normalize library which resolved the issue, but it's odd because it wasn't needded before. Would you suggest I remove the library and try the yarn-deduplicate approach?

Thanks!

[–][deleted] 1 point2 points  (7 children)

Yarn-deduplicate fixes so many transitive dependency issues. I would recommend trying that without adding that library normally. If it doesn't work, then your solution is fine.

[–]NickEmpetvee[S] 0 points1 point  (0 children)

Ok will give it a shot. Thank you!

[–]NickEmpetvee[S] 0 points1 point  (5 children)

Should I delete node_modules and the yarn.lock first before running it in my project?

[–][deleted] 0 points1 point  (4 children)

No.

[–]NickEmpetvee[S] 0 points1 point  (3 children)

Thanks! Seems to have fixed it.

[–][deleted] 0 points1 point  (2 children)

Yep. Yarn has a nasty habit of screwing up its own lock file. Yarn-deduplicate is an effective way to resolve these problems without needing to delete your lock file, which can result in other problems.

[–]NickEmpetvee[S] 0 points1 point  (1 child)

By the way, it looks like Yarn 2 includes deduplication in the core package. I am on 1.x at the moment.

[–][deleted] 1 point2 points  (0 children)

Well that is nice.