Lorenzo Fabro
Lorenzo Fabro

Reputation: 73

Critical dependency: the request of a dependency is an expression Importing npm module

I have read tons of questions and it seems to be a webpack issue but I can't realize how to solve it. I have installed this npm module and when I attempt to import it I got the dependency error. The imported file (var mercadopago = require('mercadopago');) contains only the following line:

module.exports = require('./lib/mercadopago.js');

I'm using Vue and webpack version is 4.42.1. Any help is appreciated, thanks!

Upvotes: 0

Views: 366

Answers (1)

Keimeno
Keimeno

Reputation: 2644

It is a NodeJS SDK. Which means it won't work in the browser. It would however work if you import it in your NodeJS Server.

Upvotes: 1

Related Questions