loki icon indicating copy to clipboard operation
loki copied to clipboard

Without yarn?

Open geoffreyrichey opened this issue 7 years ago • 3 comments

I'd like to implement this into my CI flow and not have to install yarn on my docker image.

I might be asking a dumb question but how/can all of the yarn commands be run as node/npm commands without yarn?

geoffreyrichey avatar Jan 05 '19 05:01 geoffreyrichey

You can usually substitute "yarn " with "npm run "

On Sat., 5 Jan. 2019, 16:37 Geoffrey Richey <[email protected] wrote:

I'd like to implement this into my CI flow and not have to install yarn on my docker image.

I might be asking a dumb question but how/can all of the yarn commands be run as node/npm commands without yarn?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/oblador/loki/issues/123, or mute the thread https://github.com/notifications/unsubscribe-auth/ABaX2_G50UVYJW-vgh8SpzWJ_R-Gvx2_ks5vADn-gaJpZM4ZvYB2 .

priomsrb avatar Jan 05 '19 05:01 priomsrb

@priomsrb I tried running npm run loki update and npm complains saying it cannot find the loki script.

vanpacheco avatar May 30 '19 16:05 vanpacheco

You can run locally installed CLIs using yarn <command> [<args>] Executables stored in the ./node_modules/.bin folder

So the error cannot find the loki script could be because npm can only run user-defined scripts (from the package.json file)

Option 1

Try running the loki command using pnx (included in [email protected] or newer)

npx loki update

Option 2

Add a loki as a script to the package.json

{
  "scripts:" {
    "loki": "npm run loki"
  }
}

Then run npm run loki

techeverri avatar May 31 '19 00:05 techeverri