cristiand391 / sf-plugin-fzf-cmp

Fuzzy completion for the Salesforce CLI
3 stars 0 forks source link

Cannot find module '/home/wtaylor/%~dp0\dev' #5

Closed sir-wallaby closed 5 months ago

sir-wallaby commented 5 months ago

Hi, I'm attempting to use your sf plugin and I run into a node.js module error anytime I attempt to use fzf on a command outside of this if statement:

if [[ "$@" == "sf " || "$@" == "sf which " || "$@" == "sf help " ]];

I would assume the error is thrown in the else and is related to a missing npm dependencies?

The full error output:

sf config set **/home/wtaylor/.local/share/sf/client/2.38.7-023d2b4/bin/dev.cmd: 1: @echo: not found
node:internal/modules/cjs/loader:1078
  throw err;
  ^

Error: Cannot find module '/home/wtaylor/%~dp0\dev'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v18.15.0

Also here is some sf cli info:


sf version --verbose 
 CLI Version:
    @salesforce/cli/2.38.7

 Architecture:
    linux-x64

 Node Version:
    node-v20.12.2

 Plugin Version:
    @cristiand391/sf-plugin-fzf-cmp 0.2.0 (user)
    @oclif/plugin-autocomplete 3.0.15 (core)
    @oclif/plugin-commands 3.3.1 (core)
    @oclif/plugin-help 6.0.21 (core)
    @oclif/plugin-not-found 3.1.4 (core)
    @oclif/plugin-plugins 5.0.10 (core)
    @oclif/plugin-search 1.0.22 (core)
    @oclif/plugin-update 4.2.6 (core)
    @oclif/plugin-version 2.0.17 (core)
    @oclif/plugin-warn-if-update-available 3.0.15 (core)
    @oclif/plugin-which 3.1.7 (core)
    @salesforce/cli 2.38.7 (core)
    apex 3.1.5 (core)
    auth 3.6.1 (core)
    data 3.3.1 (core)
    deploy-retrieve 3.6.3 (core)
    info 3.2.1 (core)
    limits 3.3.3 (core)
    marketplace 1.2.1 (core)
    org 4.1.1 (core)
    packaging 2.4.0 (core)
    schema 3.3.3 (core)
    settings 2.2.1 (core)
    signups 2.2.1 (user)
    sobject 1.3.3 (core)
    source 3.3.1 (core)
    telemetry 3.3.2 (core)
    templates 56.2.2 (core)
    trust 3.6.3 (core)
    user 3.5.2 (core)
    @salesforce/sfdx-plugin-lwc-test 1.2.0 (user)
    @salesforce/sfdx-scanner 4.0.0 (user)

 OS and Version:
    Linux 6.5.0-28-generic

 Shell:
    zsh

 Root Path:
    /home/wtaylor/.local/share/sf/client/2.38.7-023d2b4
sir-wallaby commented 5 months ago

This was an issue with my environment. I purged sf cli, node.js and npm packages then switched to using nvm to install the latest LTS of node.js. After that, I reinstalled sf cli with npm and reinstalled this plugin. Works great so far!