Skip to content

SyntaxError: The requested module 'ocpp-eliftech' does not provide an export named 'OCPPServer' #8

Open
@udayprksh

Description

@udayprksh

Hi,

I have installed the OCPP module using "npm install --save ocpp-eliftech" and use the OCPP Server example in our index.js file as shown below :

import { OCPPServer, OCPPCommands } from 'ocpp-eliftech';
const server = new OCPPServer();
server.listen(9220);
server.onRequest = async function(command) {
// Handle different commands
if (command instanceof OCPPCommands.BootNotification) {
return {
status: 'Accepted',
currentTime: new Date().toISOString(),
interval: 60
};
}
}

When we run npm start then got error "SyntaxError: The requested module 'ocpp-eliftech' does not provide an export named 'OCPPServer'"

Please let me know how to solve this issue.

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