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

319
Visualizações
How can I run a yarn app/How to run a yarn dev server?

I've always used just npm and never yarn/webpack explicitly. I need to run the code from this repo: https://github.com/looker-open-source/custom_visualizations_v2

Like a dev server or something to ensure it's serving the files properly but I don't see a "run" like npm run start. Does this just not exist with yarn? It feels like this code should work as is and I shouldn't have to add anything.

EDIT: I've now tried yarn run watch but it just seems to build the code again and not actually host anywhere

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

npm run somecommand just looks up in the "scripts" field of package.json for the key somecommand and executes the value in the terminal.

So npm run start basically runs the start script from package.json The same thing is done using yarn via simply yarn start

In the linked repo, there isn't a start script in the package.json, rather a watch script, so you should be able to run it with the below steps:

  1. yarn to install dependencies after cloning the repo to local (similar to npm install)
  2. yarn watch to start the webpack server (analogous to npm run watch)

Edit: Turns out the watch command is just setting up webpack to watch for changes and recompile the project every time there is a change.

To run a development server, you will need to add another script preferably with name start and use webpack-dev-server

So the package.json has entries like:

...
    "watch": "webpack --config webpack.config.js --watch --progress",
    "start": "webpack-dev-server --config webpack.config.js",
...

Then running yarn start should open a dev server at localhost:8080

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