-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing sdk in express js project #65
Comments
try removing |
Hello, I've tried the following setup but I keep getting the same error. loop.js
server.js
And finally I've added the "type": "module" line in the package.json file in order to avoid the first kind of error. The error I get by running the line inside server.js is the following: |
can you support a environment for me can reproduce your you problem |
Yes, I'll try to deliver it later this week. I also want to provide several PRs that should resolve some of these issues or improve DX of this project. But first, the simple example repo! |
Here's the example app. It's basically a "hello world" with a couple of imports. https://github.com/akwodkiewicz/loopring-sdk-usage-example There are 2 versions of the app on 2 branches: |
old version package cjs with js wrap. Code change in package.json
|
I am trying to develop an expressjs app and inside my project I would like to use the following sdk: https://loopring-1.gitbook.io/loopring-dev-docs/sdk/sdk-guides
Following the instructions, I have installed the package via npm and I created a file inside my project named loop.js where I have pasted the starting code provided in the website:
When I try to run the code in nodejs I get the following error: error1
I have tried to add the "type": "module" line in package.json but then I got this different kind of error by running the import line:
error2
Could you please help me to integrate the sdk in my project?
The text was updated successfully, but these errors were encountered: