Skip to content
This repository was archived by the owner on Feb 19, 2026. It is now read-only.

Commit b6f3b36

Browse files
committed
Breaking: don't skip downloads in standalone mode
I.e. when running `npm install` in the working directory of a project that uses prebuild-install, you must now run a more explicit `npm install --build-from-source`. This is necessary to support npm 7, where we do not have enough information to automatically determine it and would erroneously skip downloads on normal installs.
1 parent 08eaf6d commit b6f3b36

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

bin.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@ if (!isNpm && /node_modules/.test(process.cwd())) {
5151
} else if (opts.force) {
5252
log.warn('install', 'prebuilt binaries enforced with --force!')
5353
log.warn('install', 'prebuilt binaries may be out of date!')
54-
} else if (typeof origin !== 'string') {
55-
log.info('install', 'installing standalone, skipping download.')
56-
process.exit(1)
57-
} else if (origin.length > 4 && origin.substr(0, 4) === 'git+') {
54+
} else if (origin && origin.length > 4 && origin.substr(0, 4) === 'git+') {
5855
log.info('install', 'installing from git repository, skipping download.')
5956
process.exit(1)
6057
} else if (opts.compile === true || opts.prebuild === false) {

0 commit comments

Comments
 (0)