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

166
Views
el nodo cross-env no puede establecer las variables de clase

estoy usando node v12.22.9 , npm 8.5.1 e instalé cross-env: "^7.0"

 ERROR in ./resources/js/frontend/eyesonMeeting.js Module build failed: SyntaxError: Unexpected token (4:10) 2 | 3 | class eyesonMeeting { > 4 | audio = true | ^

¿Cómo puedo establecer las variables de clase sin conflicto? Intenté reemplazar cross-env por laravel-mix pero enfrenté un conflicto con sass.

scripts package.json :

 "dev": "npm run development", "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", "watch": "npm run development -- --watch",
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Cuando usa clases, puede usar el constructor para establecer variables de clase usando this

 class eyesonMeeting { constructor() { this.audio = true; } // example using audio in a different function someFunctionSettingAudioFalse() { this.audio = false; } hasAudio() { return this.audio; } }
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!