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';


Login to post a comment