nextjs14 - How do I prevent automatic creation of Yarn's package-lock.json file? - Stack Overflow

admin2025-04-16  5

I'm working on a Next.js project and upgraded from Yarn to Yarn Berry. However, there's an ongoing issue where <package-lock.json> keeps automatically generating in my project root. Moreover, my package.json file keeps including project as a dependency. Even when I delete this line, it keeps regenerating along with the <package-lock.json> file. Please help me resolve this persistent issue.

I've tried deleting both yarn and yarn cache, and even modified the global yarn packages. However, the issue persists... I've also added package-lock.json to the gitignore file, but that didn't solve the problem either.

.png

.png

.png

转载请注明原文地址:http://www.anycun.com/QandA/1744742109a86970.html