Questions tagged [npm-shrinkwrap]

npm shrinkwrap" is a command on npm CLI which is used as a deployment mechanism for locking down dependency versions for publication.

npm shrinkwrap is a deployment mechanism used by that recursively saves the exact version of every dependency's dependencies to a npm-shrinkwrap.json file.

Reference:

60 questions
2
votes
1 answer

NPM shrinkwrap in development

What happens when you do npm install in a dev environment on a project that has both a package.json and a npm-shrinkwrap.json file? Will it ignore the shrinkwrap and use package.json for everything or just for the dev dependencies?
Nick Dima
  • 1,587
  • 2
  • 18
  • 36
2
votes
1 answer

meteor fails, can't install npm-packages from npm-shrinkwrap

I have been diagnosing this issue for a few days and have tested the top issue resolutions that appear for "meteor" and "npm" dependencies that look similar to this one. Both I and my back-end engineer are stumped. I'm using an OSX 10.10.3, ruby…
Roralee
  • 508
  • 1
  • 4
  • 15
2
votes
0 answers

How can I save newly-created node modules to my package.json?

I make new features as node modules. mkdir node_modules/some-feature cd node_modules/some-feature npm init Of course, when I shrinkwrap, I get error messages like: npm ERR! extraneous: some-feature@0.0.0…
mikemaccana
  • 110,530
  • 99
  • 389
  • 494
1
vote
1 answer

Cannot use module "dotenv" in my preload.js even if I have it in my dependencies

I have just started using Electron. This is the start of my preload.js: const { contextBridge } = require('electron'); require('dotenv').config(); // ... When I used npm start, the app started normally, except that the preload.js didn't do…
ChesterWOV
  • 333
  • 2
  • 10
1
vote
0 answers

How to fix npm shrinkwrap not working in locking down dependency

This is the scenario: I have a package, say package-a that depends on package-b. I have version 2.0.0 of package-a depends on version 1.1.0 of package-b. I specified this dependency using the notation: ^1.1.0. I generated the lock file and then the…
Finlay Weber
  • 2,989
  • 3
  • 17
  • 37
1
vote
0 answers

install npm package from bitbucket without npm-shrinkwrap.json

The question: In NodeJS how can I ignore the shrinkwrap of a dependency "Package B" on an "npm install" in the higher order "Project A", when "Package B" comes from a private repo. The background: Let's say we develop on a private npm-package…
sitterhonk
  • 11
  • 1
1
vote
0 answers

npm install errors out on all packes if npm-shrinkwrap.json is present

node v10.15.0 npm v6.4.1 I inherited a project that has an npm-shrinkwrap.json next to the package.json. When I run npm install I get errors like the following for the files in every single package that should be downloaded npm WARN tar ENOENT:…
Jens
  • 159
  • 1
  • 10
1
vote
2 answers

Why package-lock.json is created if npm already have the npm-shrinkwrap.json for locking purpose?

npm-shrinkwrap.json: Lock down the node_modules tree as well as dependencies and nested dependencies to prevent the package code breaking on other machines. package-lock.json: Lock down the node_modules tree as well as dependencies and nested…
user10220492
1
vote
0 answers

How to upgrade package.json and npm-shrinkwrap.json to the latest node v8.11.1

I have a CLI git repository that contains list of modules of package.json and npm-shrinkwrap.json files.Currently this works fine with node v6.11.1,I want to upgrade it to support to the latest node v8.11.1. I have tried these below commands but no…
1
vote
1 answer

Add git hook to watch for files' changes

I am trying to create a git hook that evaluate the package.json for changes and auto-runs the shrinkwrapper and commits the changed file to a repository. I have tried a lot, but could not get a working solution. Does anyone know how do that ? Also,…
Max Doung
  • 221
  • 3
  • 14
1
vote
1 answer

Why does npm shrinkwrap replace a version designation with a url for the from field?

I changed the name of a package I was working on and so I reran npm shrinkwrap. I didn't change any of the fields for the other dependencies. I noticed something odd where npm shrinkwrap changed the "from" property for the pg package from: "from":…
opike
  • 7,053
  • 14
  • 68
  • 95
1
vote
1 answer

npm shrinkwrap complaining of missing dependencies

I have been building releases in my CI environment by checking out from source control, running npm install on a clean directory, followed by npm dedupe && npm shrinkwrap. This has been working perfectly. Now shrinkwrap is throwing an error: npm…
MDalt
  • 1,681
  • 2
  • 24
  • 46
1
vote
1 answer

Foreach undefined for data that comes from query

My query works fine, if I do not use shrinkwrap or yarn on my aws ubuntu 14.04 machine. However, the same query works fine with shrinkwrap/yarn on local machine, but somehow they don't work on aws machine. The query is as shown below: var express…
user7510478
1
vote
1 answer

Why does npm-shrinkwrap flip-flops between names and URLs every time?

Using: node v4.6.2, npm 2.15.5, nvm 0.29.0, Homebrew 1.1.1-64-g17bad9a, macOS 10.12.1 Steps: I update package.json, delete all my modules: rm -fr node_modules, reinstall everything: nvm exec npm install, and update the shrinkwrap: nvm exec npm…
remino
  • 324
  • 2
  • 17
1
vote
2 answers

How check consistency npm-shrinkwrap.json and package.json

Sometimes my team members forgot to update npm-shrinkwrap.json after update package.json. I know this package from uber, but it can not be used with npm v3. So now it is not solution. Do have I possibility to auto check consistency for…
galkin
  • 5,264
  • 3
  • 34
  • 51