NPM Setting and Saving Local Relative Path

I am trying a npm install

local package .tgz

to distribute common Angular components.

npm install ./../@company/my-package-0.10.0.tgz --save

      

The problem is that the above code is storing the full path in package.json

.

eg.

"@company/package": "file:///C:\\...\\my-package-0.10.0.tgz"

      

This creates a source control issue for other developers on my team, since we don't have all sources installed in the same location.

How can I do to npm

save the relative path of a file in package.json

using a command npm install

? I don't want to package.json

manually modify the file and run a full npm install every time the component package is updated.

EDIT:

To clarify, this is the end result I want:

install:

npm install ./../@company/my-package-0.10.0.tgz --save

package.json:

"@company/package": file:./../@company/my-package-0.10.0.tgz

+3
npm npm-install package.json


source to share


No one has answered this question yet

Check out similar questions:

1988
Find the version of the installed npm package
1822
What's the difference between dependencies, devDependencies and peerDependencies in the npm package.json file?
1700
What is the difference between Bower and npm?
1688
What is the -save option for npm install?
1544
How can I upgrade NodeJS and NPM to the next versions?
1205
npm throws error without sudo
1203
NPM vs. Bower vs. Browserify vs. Gulp vs. Grunt vs. Webpack
831
Where does npm install packages?
782
How do I install an npm package from GitHub directly?
228
Installing a local module using npm?



All Articles
Loading...
X
Show
Funny
Dev
Pics