I have workspace with several packages and plan to reference one to other.
+ root
|-+ packages
|-+ openapi-jsdoc
|-+ api-1
|-+ api-2
My api-1
and api-2
would like to use openapi-jsdoc
, which in my imagination is as easy as doing cd packages/api-1; npm install ../openapi-jsdoc
. But it is not, and found weird errors.
$ npm install ../packages/openapi-jsdoc
npm ERR! Cannot set properties of null (setting 'dev')
$ npm install packages/openapi-jsdoc
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/packages/openapi-jsdoc.git
npm ERR! ERROR: Repository not found.
npm ERR! fatal: Could not read from remote repository.
$ npm install git+file:packages/openapi-jsdoc/
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote file://packages/openapi-jsdoc/
Is there any concept of workspace I'm missed out. Then, how to do this correctly?