Open Fafnur opened 5 days ago
I have the same exact problem. Added package-lock.json to gitignore monorepo wouldn't start even after re-cloning the repo and fresh modules install. Removing package-lock.json from .gitignore instantly fixed it.
Node : 20.11.1
OS : win32-x64
Native Target : x86_64-windows
npm : 10.5.0
nx (global) : 20.1.4
nx : 20.1.4
@nx/js : 20.1.4
@nx/jest : 20.1.4
@nx/eslint : 20.1.4
@nx/workspace : 20.1.4
@nx/angular : 20.1.4
@nx/devkit : 20.1.4
@nx/eslint-plugin : 20.1.4
@nx/nest : 20.1.4
@nx/node : 20.1.4
@nx/web : 20.1.4
@nx/webpack : 20.1.4
typescript : 5.5.4
---------------------------------------
Registered Plugins:
@nx/webpack/plugin
@nx/eslint/plugin
---------------------------------------
Community plugins:
angular-eslint : 18.4.3
Current Behavior
If you add yarn.lock to .gitignore for a monorepo with nestjs, the project will crash with an error.
Error message:
If you remove yarn.lock from .gitignore, everything is fine.
Expected Behavior
Adding yarn.lock should not affect server startup with yarn.
GitHub Repo
https://github.com/Fafnur/nx-gitignore-bug
Steps to Reproduce
"packageManager": "yarn@4.5.3"
nodeLinker: node-modules
yarn.lock
in .gitignoreNx Report
Failure Logs
Package Manager Version
4.5.3
Operating System
Additional Information
No response