Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

trying to use require "path" error: The "path" argument must be of type string #26

@tansaku

Description

@tansaku
❯ node --experimental-modules
Welcome to Node.js v16.3.0.
Type ".help" for more information.
> const _eval = require('eval', '.', {}, true)
undefined
> _eval("var expect = require('chai').expect", true)
Uncaught:
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received null
    at new NodeError (node:internal/errors:363:5)
    at validateString (node:internal/validators:119:11)
    at Object.dirname (node:path:1276:5)
    at new Module (node:internal/modules/cjs/loader:170:20)
    at requireLike (/Users/samueljoseph/Documents/Github/neurogrid/paironauts/node_modules/require-like/lib/require-like.js:5:22)
    at module.exports (/Users/samueljoseph/Documents/Github/neurogrid/paironauts/node_modules/eval/eval.js:44:23)
    at REPL2:1:1
    at Script.runInThisContext (node:vm:129:12)
    at REPLServer.defaultEval (node:repl:522:29)
    at bound (node:domain:416:15) {
  code: 'ERR_INVALID_ARG_TYPE'
}

any ideas?

I looked at the following issues:

but not sure what to try next ...

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