fhqvst/nordnet

Not working on Node 12.13.1

mountaindude opened this issue · 2 comments

Trying the demo code on Node v12.13.1 on MacOS, failing when executed:

import Nordnet from 'nordnet'
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at Module._compile (internal/modules/cjs/loader.js:895:18)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11

I realise this might not be an active project these days, still wanted to report it.

Just do const Nordnet = require('nordnet') instead.