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

185
Views
NuxtJS carga módulos cjs

Intento usar bibliotecas de terceros en mi proyecto NuxtJS . Esta dependencia tiene extensiones cjs y mjs .

Importación sencilla

 import { DataModel } from '@glazed/datamodel' import { DIDDataStore } from '@glazed/did-datastore'

error planteado:

 ERROR Failed to compile with 1 errors friendly-errors 16:55:12 ERROR in ./node_modules/@glazed/datamodel/dist/lib.cjs friendly-errors 16:55:12 Module parse failed: Unexpected token (1:1104) friendly-errors 16:55:12 You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

Mi archivo nuxt.config.js :

 transpile: [ 'dids', 'did-jwt', '@glazed/tile-loader', '@glazed/did-datastore', '@glazed/datamodel', ], extend(config) { ... config.module.rules.push({ test: /\.mjs$/, include: /node_modules/, type: "javascript/auto", }) config.module.rules.push({ test: /\.сjs$/, include: /node_modules/, type: "javascript/auto", }) ...

¿Qué ocurre?

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!