Skip to content

Commit 61481a2

Browse files
committed
fix: update node install scripts for npm 9
Signed-off-by: Russell Centanni <russell.centanni@gmail.com>
1 parent ee2b38e commit 61481a2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

dist/npm/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,8 @@ let continueProcess = function (askRemoveGlobalFolder) {
224224

225225
if (npmLinkExists || !globalDir || packageDir.startsWith(npmGlobalDir)) {
226226
try {
227-
globalDir = normalizePath(execSync('npm bin -g').toString());
227+
const nodeDir = normalizePath(execSync('npm config get prefix').toString());
228+
globalDir = path.join(nodeDir, 'bin')
228229
globalInstall = true;
229230
} catch (e) {
230231
console.error(e);

0 commit comments

Comments
 (0)