Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Paolo-Oliverio opened this issue Aug 20, 2024 · 0 comments

Comments

@Paolo-Oliverio
Copy link
Contributor

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.

@Paolo-Oliverio Paolo-Oliverio changed the title Require scripts in kfile.js fails with missing internal module error. Require custom scripts in kfile.js fails with missing internal module error. Aug 20, 2024
@Paolo-Oliverio Paolo-Oliverio changed the title Require custom scripts in kfile.js fails with missing internal module error. Require custom js scripts in kfile.js fails with missing internal module error. Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant