antonmedv/fx

Npm fx support for .fxrc.js

ilanc opened this issue · 3 comments

ilanc commented

howdy - I can't get either to ~/.fxrc or ~/.fxrc.js to work without manually hacking the code. Having had a look at the deployed fx script (I installed it via npm i -g fx) I can't see any code which would load either of these two files. Has this been deprecated?

My workaround was to manually add a require statement to the top of the fx bin i.e. ICHACK below:

$ which fx
/home/ilan/.nvm/versions/node/v18.12.1/bin/fx

$ head -4 `which fx`
#!/usr/bin/env node
require("/home/ilan/.fxrc.js"); // ICHACK

void (async function main() {

I'm using nvm, node 18, Ubuntu 22.04.2 LTS

Ohh! You are right. totally forgot about the fxrc.

I recently rewrote the whole npm fx package to a single file (also with Deno support) and missed this part. Will add it back.

Fixed in npm release 28.0.0.

Now also supports .fxrc.js in cwd.