我有这个错误:
Cannot read property 'prototype' of undefined
我使用 ccxt 和 express。我认为它表达了问题,但我不知道该怎么做。
'use strict';
import { response } from 'express';
const api = () => {
const ccxt = require ('ccxt');
let sum = 0;
let i = 0;
const express = require('express')
const app = express()
// Defining CORS
app.use(function(req, res, next) {
res.setHeader(
"Access-Control-Allow-Headers",
"X-Requested-With,content-type"
);
res.setHeader("Access-Control-Allow-Origin", "*");
res.setHeader(
"Access-Control-Allow-Methods",
"GET, POST, OPTIONS, PUT, PATCH, DELETE"
);
res.setHeader("Access-Control-Allow-Credentials", true);
next();
});
...