Skip to content

CLI Error - ERR_UNKNOWN_FILE_EXTENSION #1564

@pinpointpanda

Description

@pinpointpanda

I'm getting the following error when installing and running hubspot/cli@latest.

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension "" for /Users/mike/.nvm/versions/node/v20.9.0/lib/node_modules/@hubspot/cli/bin/hs. Loading extensionless files is not supported inside of "type":"module" package.json contexts. The package.json file /Users/mike/.nvm/versions/node/v20.9.0/lib/node_modules/@hubspot/cli/package.json caused this "type":"module" context. Try changing /Users/mike/.nvm/versions/node/v20.9.0/lib/node_modules/@hubspot/cli/bin/hs to have a file extension. Note the "bin" field of package.json can point to a file with an extension, for example {"type":"module","bin":{"hs":"./bin/hs.js"}}

I'm running Node version 20.9.0, which I think should be okay?

I can run 7.5.4 just fine.

Any ideas?

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