Git Product home page Git Product logo

afas-connect's People

Contributors

appy-one avatar deanverjans avatar garbageslave avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

afas-connect's Issues

Node Fetch 3

Anyone else having problems using the latest version of this module? It seems like the node-fetch version has been increased, but now my project won't build resulting in:

/Users/user/afas-connect-test/node_modules/afas-connect/lib/classes/Connector.js:12
const node_fetch_1 = require("node-fetch");
                     ^
 
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/user/afas-connect-test/node_modules/node-fetch/src/index.js from /Users/user/afas-connect-test/node_modules/afas-connect/lib/classes/Connector.js not supported.
Instead change the require of index.js in /Users/user/afas-connect-test/node_modules/afas-connect/lib/classes/Connector.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/Users/user/afas-connect-test/node_modules/afas-connect/lib/classes/Connector.js:12:22)
    at Object.<anonymous> (/Users/user/afas-connect-test/node_modules/afas-connect/lib/classes/GetConnector.js:13:21)
    at Object.<anonymous> (/Users/user/afas-connect-test/node_modules/afas-connect/lib/classes/Profit.js:13:24)
    at Object.<anonymous> (/Users/user/afas-connect-test/node_modules/afas-connect/lib/index.js:4:18)
    at async Promise.all (index 0) {
  code: 'ERR_REQUIRE_ESM'
}

Package.json:

{
  "name": "afas-connect-test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "type": "module",
  "dependencies": {
    "afas-connect": "^3.0.3"
  }
}

index.js

import { Profit } from 'afas-connect';

const bla = new Profit({
  env: 'test',
  envType: 'test',
  token: 'vblasd',
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.