nestcoinco / nubian-dsa-connect Goto Github PK
View Code? Open in Web Editor NEWSdk for nubian connectors
Home Page: https://www.npmjs.com/package/nubian-dsa-connect
License: MIT License
Sdk for nubian connectors
Home Page: https://www.npmjs.com/package/nubian-dsa-connect
License: MIT License
I tried using the package and I keep getting back this error:
SyntaxError: Cannot use import statement outside a module
-- trace: /node_modules/nubian-dsa-connect/dist/index.js:12
import e from"axios";var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n
I tried adding "type": "module",
to package.json and change to import DSA from 'nubian-dsa-connect'
instead of require
that didn't solve it.
Any help please
When I import the Nubian SDK using import DSA from 'nubian-dsa-connect'
in a node environment and run the script, running it throws this error:
(node:46335) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
{my local directory}/node_modules/nubian-dsa-connect/dist/index.js:12
{minified code output here}
SyntaxError: Unexpected token 'export'
at wrapSafe (internal/modules/cjs/loader.js:988:16)
at Module._compile (internal/modules/cjs/loader.js:1036:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
at Module.load (internal/modules/cjs/loader.js:937:32)
at Function.Module._load (internal/modules/cjs/loader.js:778:12)
at ModuleWrap.<anonymous> (internal/modules/esm/translators.js:199:29)
at ModuleJob.run (internal/modules/esm/module_job.js:170:25)
at async Loader.import (internal/modules/esm/loader.js:178:24)
at async Object.loadESM (internal/process/esm_loader.js:68:5)
It seems it's something to do with it not being suited for a node environment, it works fine with React.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.