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

Allow paper to be required in node REPL #2011

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Commits on Nov 25, 2022

  1. Allow paper to be required in node REPL

    Attempting to require paper outside of a file context (i.e the node command line repl) leads to an error loading the path because `parent.filename` is undefined.
    
    ```
    TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received null
        at __node_internal_captureLargerStackTrace (node:internal/errors:477:5)
        at new NodeError (node:internal/errors:387:5)
        at validateString (node:internal/validators:115:11)
        at Object.dirname (node:path:1276:5)
        at Object.<anonymous> (/.../node_modules/paper/dist/node/self.js:22:48)
    ```
    
    This adds a short-circuit check which seems to fix the issue.
    akre54 authored Nov 25, 2022
    Configuration menu
    Copy the full SHA
    50f97d0 View commit details
    Browse the repository at this point in the history