Start a new topic

Cannot import ost-sdk-js /

The docs say we should 

Require the SDK:


const OSTSDK = require('@ostdotcom/ost-sdk-js');

WHich doesnt work - be it in the main app.js or in any imported dependency. I also cannot do it using import _ from '@ostdotcom' because ES cannot find the folder even though it is clearly there.

SOmething is missing in the docs. Is it a naming issue ?

Using the syntax 

import OSTSDK from '@ostdotcom/ost-sdk-js'

BReaks the compiling process.

Using the syntax from OP doesn't break the compiling, but the app on't work during runtime, logging the error 

The worst thing is that importing directly using absolute paths (setting the import in the entry point of the app, src/index.js) also leads to a Module '.' not found error.


import 'C:\\Users\\goldaw\\Desktop\\inblockiogithub\\OSTCalpha3\\blockparty\\node_modules\\@ostdotcom\\ost-sdk-js\\index.js';


Hi Dawid,

I'll forward this to our team for investigation. You can also ask technical questions in our developer chat:

We had considered making the SDK work on browser in the past.

But, we always ended-up coming to a conclusion that prevented us from proceeding further:  if you are using SDK from client-side (browser), you are exposing your API key and secret.

More Info:

Could you please let us know why you would need the SDK to work on the browser?

Login to post a comment