Skip to Content

Why cds init insert line package-lock.json in .gitignore?


The best practice seems to be to commit the file "package-lock.json" into the source repository, looking at:

but the command "cds init" insert the line "package-lock.json" into .gitignore, why?

Use case: I have a solution not yet published in production so no shrinkwrap yet, I removed the sap npm registry and done npm update, I wanted to check the changes to packages-lock.json but I discovered was not under versioning.


Best Regards,


l9dlj.png (8.0 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jul 15, 2020 at 12:01 PM

    Hi Sam,

    That will be fixed with the next release. Please follow the changelog to see that the change has been made.

    Best regards,

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.