Skip to content

Commit 3d13b99

Browse files
fix: add require of lodash in helpers
Currently the postinstall.js requires helpers and tries to execute some methods of it. However, CLI is not bootstraped and the global variable `_` is not set, so the action fails. Fix the code by adding require to `lodash` in the current file. The other option of fix is to remove the `helpers` require from postinstall script to `post-install-cli` command. However, the current check is if we should execute the postinstall actions - if we move the check to the command, the commands service will still execute the check and prompt the user to allow tracking, which is not a desired behavior.
1 parent a7b754a commit 3d13b99

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/common/helpers.ts

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { ReadStream } from "tty";
55
import { Configurations } from "./constants";
66
import { EventEmitter } from "events";
77
import * as crypto from "crypto";
8+
import * as _ from "lodash";
89

910
const Table = require("cli-table");
1011

0 commit comments

Comments
 (0)