CC: Tweaked

CC: Tweaked

59M Downloads

[1.20.x] Build task fail with typescript error

tmvkrpxl0 opened this issue ยท 1 comments

commented

I've been following build instruction but it fails with typescript error:

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at __node_internal_captureLargerStackTrace (node:internal/errors:490:5)
    at new NodeError (node:internal/errors:399:5)
    at validateString (node:internal/validators:163:11)
    at Object.join (node:path:1172:7)
    at <anonymous> (/tmp/CC-Tweaked/projects/web/src/htmlTransform/index.tsx:62:33) {
  code: 'ERR_INVALID_ARG_TYPE'
}

File CC-Tweaked/projects/web/src/htmlTransform/index.tsx references file.path which does not exist on my pc:

const sourcePath = path.join(file.path, file.name);

To confirm this I have ran this command on node(v18.14.0)

await fs.readdir("/tmp/CC-Tweaked/projects/web/build/illuaminate", { withFileTypes: true, recursive: true }, function(err, file) { console.log(file.path + "") })

This prints "undefined". running it with file instead of file.path prints these entries instead:

Dirent { name: 'basic-terminal-45a33440.png', [Symbol(type)]: 1 
commented

I've upgraded node to v20.12.2 and did the same test. The result was same.