Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

278
Views
Is there a way to test an in-development NPM package via NPX?

I'm working on an NPM package that is intended for use solely via npx *, a la packages like create-nuxt-app.

Is there a way to test my package with npx *? In other words, run my bin script without installing the package.

I've read this discussion, which suggests perhaps there isn't. I realise I can test the installation, rather than mere running, of my a packge via something like Yalc, but Yalc provides only yalc add *, which simulates npm install *, not npx *.

What's the best approach here?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

After much digging and discussion it seems npm init * is identical to npx * provided the package name begins with create-. (Source).

So:

npx create-nuxt-app

is actually the same as

npm init nuxt-app

If your package doesn't begin with create- this won't work.

You can use either approach to pass args, if the package allows it.

This means you can use traditional NPM package testing mechanisms e.g. npm-link or something like Yalc, but test via npm * syntax rather than npx *.

over 4 years ago · Santiago Trujillo Report

0

I mean why don’t you just publish yow code to npm. Change the version of it

{
“name”:”yowPackage”,
“version”:”0.0.1-dev”,
…
}

then you can test yow package

$ npx yowPackage@0.0.1-dev arguments

Then once yow code works publish the oficial version

{
“name”:”yowPackage”,
“version”:”1.0.0”,
…
}

$ npx yowPackage@1.0.0 arguments

Check this to learn more about it

https://docs.npmjs.com/adding-dist-tags-to-packages

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!