Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Examples Don't Work #49

@redwolf-albath

Description

@redwolf-albath

Hey,

I tried to use your project, it's very promising.

I ran into issued with typescript, tried many things to resolve it but it seems there is an issue with your project.

Here is the code:

import { BusUtil } from '@vmw/transport/util/bus.util';
import { LogLevel } from '@vmw/transport/log';

export class App {

    constructor() {
        // initializing transport, with debug logging enabled, and the boot message is not disabled.
        // BusUtil.bootBusWithOptions(LogLevel.Debug, false);
        BusUtil.bootBus()
    }
}

I'll share the error below, please let me know how I can fix it.

/home/[redacted]/Documents/repos/transport_tests/node_modules/@vmw/transport/util/bus.util.js:5
import { TransportEventBus } from '../bus';
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at Object.compileFunction (node:vm:353:18)
    at wrapSafe (node:internal/modules/cjs/loader:1039:15)
    at Module._compile (node:internal/modules/cjs/loader:1073:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
    at Module.load (node:internal/modules/cjs/loader:989:32)
    at Function.Module._load (node:internal/modules/cjs/loader:829:14)
    at Module.require (node:internal/modules/cjs/loader:1013:19)
    at require (node:internal/modules/cjs/helpers:93:18)
    at Object.<anonymous> (/home/[redacted]/Documents/repos/transport_tests/dist/index.js:4:20)
    at Module._compile (node:internal/modules/cjs/loader:1109:14)
[redacted]@[redacted]:~/Documents/repos/transport_tests$ node -v

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions