Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

377
Vistas
Which command to use for "compiling" a new NPM project?

I'm making a simple JS website using Three.js. I started my project this way:

$ npm init
$ npm install three

Where should I write my code that uses Three.js, and what is the npm command I should run to "compile" my script for something to drop in my webserver public_html?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

1 - Run "npm init", it will create package.json file in your package/project directory.

2 - Run "npm install three", it will install the external package and download it into "node_modules" folder.

3 - Create your own .js file. Example {in your package directory}/<yourMainFile>.js. Ensure in the package.json, you change the following attribute "main": "<yourMainFile>.js".

4 - Refer to "three" package usage in https://www.npmjs.com/package/three. and then write the sample code in <yourMainFile>.js

5 - If you want to test the result, run: $ node ./<yourMainFile>.js

  • Use "./" if git bash cli.

6- If inside <yourMainFile>.js file contain console.log("hello or what ever result you want to display"), then you will see the text display in the console.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda