The npm community forum has been discontinued.
To discuss usage of npm, visit the GitHub Support Community.
Allow `npm install` to work with missing dependencies
I filed this issue with Verdaccio:
it was inspired by this StackOverflow question:
For the purposes of developer tools, it would help if
npm install worked even if packages weren’t already published to the registry. How would it work? I think it would be simple. NPM would use a dummy package if the package wasn’t on the registry.
Simply put this feature behind a flag, and it won’t break anyone:
npm install --allow-missing
or maybe explicit skipping of packages:
npm install --skip=lodash --skip=rxjs
this would save time during the install, if you are planning to symlink local depenendencies to node_modules.
In other words, say you were developing lodash and rxjs locally, and were going to symlink them to node_modules, when you first run
npm install you could effectively skip installing lodash and rxjs because you are going to symlink them anyway, to the top-level node_modules folder.
Likewise, for some people, they want to develop packages that haven’t yet been published before, so it would help if
npm install didn’t fail for packages that aren’t in the registry yet.
So to be abundantly clear:
would mean if a package could not be found, a dummy/empty package would be put in it’s place. On the other hand,
would mean it would not even attempt to find lodash in the registry, it would just put a dummy package in it’s place.
Thumbs up! This is a very good feature. We are managing a monorepo where not all packages are available in the registry and we are using lerna to establish links. Right now, we can’t run “npm install”, because of this, so we have to install some dependencies manually, which is a pain.
It would be very beneficial to run
npm install --skip-missing!
@SupportTech any way to get this feature rolling?
I think it is a good idea.
But we must consider that the linked source may be under great pressure.