Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

214
Visualizações
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 Respostas
Responde à pergunta

0

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

"build": "next build",

about 4 years ago · Juan Pablo Isaza Relatório

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda