Hi there,
I'm trying to import deriv-api, but I'm receving the following error message:
> binarybot@1.0.0 start C:\Users\User\vscode-workspace\binarybot
> node index.js
file:///C:/Users/User/vscode-workspace/binarybot/index.js:4
import DerivAPI from '@deriv/deriv-api';
^^^^^^^^
SyntaxError: The requested module '@deriv/deriv-api' does not provide an export named 'default'
at ModuleJob._instantiate (internal/modules/esm/module_job.js:92:21)
at async ModuleJob.run (internal/modules/esm/module_job.js:107:20)
at async Loader.import (internal/modules/esm/loader.js:179:24)
I ran the code below using NodeJs v14.0.0 and v13.5.
Could you guys help me?
import express from 'express';
import cors from 'cors';
import routes from './routes.js';
import DerivAPI from '@deriv/deriv-api';
var app = express();
var router = express.Router()
app.use(cors());
app.use(express.json());
router.get('/', function (req, res) {
res.send('ROOT FOLDER')
})
app.use(routes);
app.listen(3333, () => {
console.log('debug > console listening on port 3333');
});
If you guys need more information, please, let me know.
Hi there,
I'm trying to import deriv-api, but I'm receving the following error message:
I ran the code below using NodeJs v14.0.0 and v13.5.
Could you guys help me?
If you guys need more information, please, let me know.