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

220
Views
Biblioteca Wasm-bindgen y broma: token no válido o inesperado @import"?

Estoy tratando de usar jest en un proyecto de reacción mecanografiada que importa una biblioteca de óxido/wasm y, aunque funciona cuando ejecuto el front-end, la prueba de jest falla con:

 /workspace/react-jest-rust/node_modules/rust-wasm-lib/index.js:73 export function message(s) { ^^^^^^ SyntaxError: Unexpected token 'export'

Creé un ejemplo, simplemente ejecute yarn test a después de la clonación: https://github.com/Findeton/react-jest-rust

He intentado configurar jest. Si agrego esto a package.json:

 "jest": { "transformIgnorePatterns": [ "node_modules/(?!rust-wasm-lib)/" ] }

Luego aparece este otro error al ejecutar yarn test a :

 /big/workspace/sequent/react-jest-rust/node_modules/rust-wasm-lib/index.js:125 input = new URL('index_bg.wasm', import.meta.url); ^^^^ SyntaxError: Cannot use 'import.meta' outside a module 2 | import logo from './logo.svg'; 3 | import './App.css'; > 4 | import init, {test} from 'rust-wasm-lib'; | ^
about 4 years ago · Juan Pablo Isaza
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!