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

578
Views
pm ¡ERROR! guión faltante: build. Intento construir un archivo js. Tengo biblioteca npm/

Mi código principal. Tengo "require('node-rsa')" que está en la carpeta node_modules. ¿Es posible crear un archivo a partir de este código?

a.js

 var testFunct = function test(message) { const NodeRSA = require('node-rsa'); const key = new NodeRSA(); var k = key.generateKeyPair(); var p = k.exportKey('pkcs1'); return p}; console.log(testFunct())

paquete.json

 { "name": "pol", "version": "1.0.0", "description": "", "main": "a.js", "dependencies": { "node-rsa": "^1.1.1", "build": "webpack a.js b.js" }, "devDependencies": { "webpack": "^5.58.2" }, "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC" }

webpack.config.js

 module.exports = { entry: ['a.js'], output: { path: './build', filename: 'bundle.js' } }

ingrese la descripción de la imagen aquí

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

0

Agregue esta entrada a la sección de scripts de su paquete.json:

 "build": "webpack"

Esto activará el paquete web cuando ejecute la acción de compilación.

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!