Skip to content

npm, npx are not in $PATH of Formula build environment #1699

Discussion options

You must be logged in to vote

I tried inserting ENV.append_path "PATH", "#{Formula["node"].libexec}/bin" before the system "make", "build" line but that had no effect on the PATH of the build environment.

Actually, this did fix the first problem, it just hadn't been applied yet at the --interactive stage that I was inspecting. Running brew install -d -v ... verified my first fix.

The second problem was that the upstream Makefile doesn't support make's parallelism (which is enabled by default), and the build happened to trip over some parallelized npm command that made me think that my PATH fix wasn't working.

Adding ENV.deparallelize fixed the second, and hopefully final issue.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@stevehartwell
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by stevehartwell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants