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

Node 13.9.0 drop support for extensionless npm scripts ("bin") #488

@ghost

Description

package.json:

{
  "scripts": {
    "test": "tsc"
  },
  "dependencies": {
    "typescript": "^3.7.5"
  }
}

.npmrc:

node-options="--loader=./loader.js"

loader.js:

// Custom loader. May be empty for test

Command:

npm test

Result:

Node 13.8.0:

tsc

Node 13.9.0:

tsc
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension "" for c:\workspace\node_13.9.0\node_modules\typescript\bin\tsc
    at Loader.defaultGetFormat [as _getFormat] (internal/modules/esm/get_format.js:70:15)

Why ? Becacuse a lot of tools has bin specification without scripts extension: ex.

  "bin": {
    "tsc": "bin/tsc",
    "tsserver": "bin/tsserver"
  },

Why did you introduce a change that blocks npm scripts?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions