Inside the folder that contains the package.json, run:
$ npm i
Then the package-lock.json file will be created.
$ ng g library <library-name>
The library path can contain @<organization-name>/ to indicate that package are encapsulated to an organization, because the package belongs to it.
The files below must be adapted its keys that reference paths. They must contain the @<organization-name>/.
Run the command below
$ certutil -hashfile <filepath> SHA256
See more here.