Skip to content

Import Error #23

@MarkCupitt

Description

@MarkCupitt

This used to work a couple of months ago ..

I have a file index.mjs contains

import TenantOperator from './modules/operator/tenantoperator.mjs';
var tenantOperator = new TenantOperator();

./modules/operator/tenantoperator.mjs contains this

import Operator from '@dot-i/k8s-operator';
export default class TenantOperator extends Operator {

    constructor() {}
    
    async init() { ... code ... }
}

Node.js V16.18.0 (Same as I had earlier) is now giving this error @dot-i/k8s-operator": "^1.3.5 installed

Uncaught TypeError TypeError: Class extends value #<Object> is not a constructor or null

At first I thought I had a circular reference, but dpdm says I am good

AL that is changed is that I want form a index.js to index.mjs, Im happily importing other commonJS packages

I'm actually stumped at the moment .. Amny suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions