Skip to content

Require custom js scripts in kfile.js fails with missing internal module error. #58

@Paolo-Oliverio

Description

@Paolo-Oliverio

what I tried
kfile.js:

let c = require('./test.js');
c();

./test.js

module.exports = function() {
    console.log("test.js module executed");
};

error : TypeError: Missing internal module './test.js' at nativeModuleRequire (node:internal/bootstrap/loaders:340:19)

also tryed to require with absolute path

let path = require('path');
let c = require(path.resolve(__dirname, './test.js'));
c();

same error but with full path.

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