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

217
Views
Can I run an npm package without the npm run command?

I would like to run the next.js build process directly from the command line without going over the package.json. Is it possible to run it without npm run?

Instead of running npm run build

I would like to run next build directly on the command line.

Cheers for the help.

about 4 years ago · Juan Pablo Isaza
3 answers
Answer question

0

you can go to package.json and then change the scripts.

"build": "next build",

about 4 years ago · Juan Pablo Isaza Report

0

I figured it out so basically whatever you add at the end of the npm run command gets attached to the npm run command:

"scripts": {
    "dev": "next dev",
    "build": "next build",
    "export": "next build && next export -o",
  }

Now I can run

npm export jane-doe-directory

And the application will be exported to that directory.

about 4 years ago · Juan Pablo Isaza Report

0

If you look inside your project's node_modules/.bin directory, you should see an alias for the next command. So if you want to run next build directly without using npm...

Bash:

./node_modules/.bin/next build

Windows Command Prompt:

.\node_modules\.bin\next.cmd build
about 4 years ago · Juan Pablo Isaza 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!